/*
 * Generated by gdbus-codegen 2.37.5. DO NOT EDIT.
 *
 * The license of this code is the same as for the source it was derived from.
 */

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

#include "bluetooth-client-glue.h"

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

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;
  gboolean use_gvariant;
} _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;
}

/* ------------------------------------------------------------------------
 * Code for interface org.bluez.Adapter1
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.bluez.Adapter1 ---- */

static const _ExtendedGDBusMethodInfo _adapter1_method_info_start_discovery =
{
  {
    -1,
    (gchar *) "StartDiscovery",
    NULL,
    NULL,
    NULL
  },
  "handle-start-discovery",
  FALSE
};

static const _ExtendedGDBusMethodInfo _adapter1_method_info_stop_discovery =
{
  {
    -1,
    (gchar *) "StopDiscovery",
    NULL,
    NULL,
    NULL
  },
  "handle-stop-discovery",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _adapter1_method_info_remove_device_IN_ARG_pointers[] =
{
  &_adapter1_method_info_remove_device_IN_ARG_device,
  NULL
};

static const _ExtendedGDBusMethodInfo _adapter1_method_info_remove_device =
{
  {
    -1,
    (gchar *) "RemoveDevice",
    (GDBusArgInfo **) &_adapter1_method_info_remove_device_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-remove-device",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _adapter1_method_info_pointers[] =
{
  &_adapter1_method_info_start_discovery,
  &_adapter1_method_info_stop_discovery,
  &_adapter1_method_info_remove_device,
  NULL
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_address =
{
  {
    -1,
    (gchar *) "Address",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "address",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_name =
{
  {
    -1,
    (gchar *) "Name",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "name",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_alias =
{
  {
    -1,
    (gchar *) "Alias",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "alias",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_class =
{
  {
    -1,
    (gchar *) "Class",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "class",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_powered =
{
  {
    -1,
    (gchar *) "Powered",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "powered",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_discoverable =
{
  {
    -1,
    (gchar *) "Discoverable",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "discoverable",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_discoverable_timeout =
{
  {
    -1,
    (gchar *) "DiscoverableTimeout",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "discoverable-timeout",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_pairable =
{
  {
    -1,
    (gchar *) "Pairable",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "pairable",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_pairable_timeout =
{
  {
    -1,
    (gchar *) "PairableTimeout",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "pairable-timeout",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_discovering =
{
  {
    -1,
    (gchar *) "Discovering",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "discovering",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_uuids =
{
  {
    -1,
    (gchar *) "UUIDs",
    (gchar *) "as",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "uuids",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _adapter1_property_info_modalias =
{
  {
    -1,
    (gchar *) "Modalias",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "modalias",
  FALSE
};

static const _ExtendedGDBusPropertyInfo * const _adapter1_property_info_pointers[] =
{
  &_adapter1_property_info_address,
  &_adapter1_property_info_name,
  &_adapter1_property_info_alias,
  &_adapter1_property_info_class,
  &_adapter1_property_info_powered,
  &_adapter1_property_info_discoverable,
  &_adapter1_property_info_discoverable_timeout,
  &_adapter1_property_info_pairable,
  &_adapter1_property_info_pairable_timeout,
  &_adapter1_property_info_discovering,
  &_adapter1_property_info_uuids,
  &_adapter1_property_info_modalias,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _adapter1_interface_info =
{
  {
    -1,
    (gchar *) "org.bluez.Adapter1",
    (GDBusMethodInfo **) &_adapter1_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_adapter1_property_info_pointers,
    NULL
  },
  "adapter1",
};


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

/**
 * adapter1_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 #Adapter1 interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
adapter1_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "address");
  g_object_class_override_property (klass, property_id_begin++, "name");
  g_object_class_override_property (klass, property_id_begin++, "alias");
  g_object_class_override_property (klass, property_id_begin++, "class");
  g_object_class_override_property (klass, property_id_begin++, "powered");
  g_object_class_override_property (klass, property_id_begin++, "discoverable");
  g_object_class_override_property (klass, property_id_begin++, "discoverable-timeout");
  g_object_class_override_property (klass, property_id_begin++, "pairable");
  g_object_class_override_property (klass, property_id_begin++, "pairable-timeout");
  g_object_class_override_property (klass, property_id_begin++, "discovering");
  g_object_class_override_property (klass, property_id_begin++, "uuids");
  g_object_class_override_property (klass, property_id_begin++, "modalias");
  return property_id_begin - 1;
}



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

/**
 * Adapter1Iface:
 * @parent_iface: The parent interface.
 * @handle_remove_device: Handler for the #Adapter1::handle-remove-device signal.
 * @handle_start_discovery: Handler for the #Adapter1::handle-start-discovery signal.
 * @handle_stop_discovery: Handler for the #Adapter1::handle-stop-discovery signal.
 * @get_address: Getter for the #Adapter1:address property.
 * @get_alias: Getter for the #Adapter1:alias property.
 * @get_class: Getter for the #Adapter1:class property.
 * @get_discoverable: Getter for the #Adapter1:discoverable property.
 * @get_discoverable_timeout: Getter for the #Adapter1:discoverable-timeout property.
 * @get_discovering: Getter for the #Adapter1:discovering property.
 * @get_modalias: Getter for the #Adapter1:modalias property.
 * @get_name: Getter for the #Adapter1:name property.
 * @get_pairable: Getter for the #Adapter1:pairable property.
 * @get_pairable_timeout: Getter for the #Adapter1:pairable-timeout property.
 * @get_powered: Getter for the #Adapter1:powered property.
 * @get_uuids: Getter for the #Adapter1:uuids property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-bluez-Adapter1.top_of_page">org.bluez.Adapter1</link>.
 */

typedef Adapter1Iface Adapter1Interface;
G_DEFINE_INTERFACE (Adapter1, adapter1, G_TYPE_OBJECT);

static void
adapter1_default_init (Adapter1Iface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * Adapter1::handle-start-discovery:
   * @object: A #Adapter1.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Adapter1.StartDiscovery">StartDiscovery()</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 adapter1_complete_start_discovery() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-start-discovery",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Adapter1Iface, handle_start_discovery),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * Adapter1::handle-stop-discovery:
   * @object: A #Adapter1.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Adapter1.StopDiscovery">StopDiscovery()</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 adapter1_complete_stop_discovery() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-stop-discovery",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Adapter1Iface, handle_stop_discovery),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * Adapter1::handle-remove-device:
   * @object: A #Adapter1.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_device: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Adapter1.RemoveDevice">RemoveDevice()</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 adapter1_complete_remove_device() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-remove-device",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Adapter1Iface, handle_remove_device),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * Adapter1:address:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Address">"Address"</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 ("address", "Address", "Address", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:name:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Name">"Name"</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 ("name", "Name", "Name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:alias:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Alias">"Alias"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_string ("alias", "Alias", "Alias", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:class:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Class">"Class"</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 ("class", "Class", "Class", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:powered:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Powered">"Powered"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("powered", "Powered", "Powered", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:discoverable:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Discoverable">"Discoverable"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("discoverable", "Discoverable", "Discoverable", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:discoverable-timeout:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.DiscoverableTimeout">"DiscoverableTimeout"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("discoverable-timeout", "DiscoverableTimeout", "DiscoverableTimeout", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:pairable:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Pairable">"Pairable"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("pairable", "Pairable", "Pairable", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:pairable-timeout:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.PairableTimeout">"PairableTimeout"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_uint ("pairable-timeout", "PairableTimeout", "PairableTimeout", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:discovering:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Discovering">"Discovering"</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 ("discovering", "Discovering", "Discovering", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:uuids:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.UUIDs">"UUIDs"</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_boxed ("uuids", "UUIDs", "UUIDs", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Adapter1:modalias:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Adapter1.Modalias">"Modalias"</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 ("modalias", "Modalias", "Modalias", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * adapter1_get_address: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Address">"Address"</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.
 *
 * <warning>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 adapter1_dup_address() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
adapter1_get_address (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_address (object);
}

/**
 * adapter1_dup_address: (skip)
 * @object: A #Adapter1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Adapter1.Address">"Address"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
adapter1_dup_address (Adapter1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "address", &value, NULL);
  return value;
}

/**
 * adapter1_set_address: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Address">"Address"</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
adapter1_set_address (Adapter1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "address", value, NULL);
}

/**
 * adapter1_get_name: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Name">"Name"</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.
 *
 * <warning>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 adapter1_dup_name() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
adapter1_get_name (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_name (object);
}

/**
 * adapter1_dup_name: (skip)
 * @object: A #Adapter1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Adapter1.Name">"Name"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
adapter1_dup_name (Adapter1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "name", &value, NULL);
  return value;
}

/**
 * adapter1_set_name: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Name">"Name"</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
adapter1_set_name (Adapter1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "name", value, NULL);
}

/**
 * adapter1_get_alias: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Alias">"Alias"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * <warning>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 adapter1_dup_alias() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
adapter1_get_alias (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_alias (object);
}

/**
 * adapter1_dup_alias: (skip)
 * @object: A #Adapter1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Adapter1.Alias">"Alias"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
adapter1_dup_alias (Adapter1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "alias", &value, NULL);
  return value;
}

/**
 * adapter1_set_alias: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Alias">"Alias"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
adapter1_set_alias (Adapter1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "alias", value, NULL);
}

/**
 * adapter1_get_class: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Class">"Class"</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 
adapter1_get_class (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_class (object);
}

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

/**
 * adapter1_get_powered: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Powered">"Powered"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
adapter1_get_powered (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_powered (object);
}

/**
 * adapter1_set_powered: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Powered">"Powered"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
adapter1_set_powered (Adapter1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "powered", value, NULL);
}

/**
 * adapter1_get_discoverable: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Discoverable">"Discoverable"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
adapter1_get_discoverable (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_discoverable (object);
}

/**
 * adapter1_set_discoverable: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Discoverable">"Discoverable"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
adapter1_set_discoverable (Adapter1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "discoverable", value, NULL);
}

/**
 * adapter1_get_discoverable_timeout: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.DiscoverableTimeout">"DiscoverableTimeout"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
adapter1_get_discoverable_timeout (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_discoverable_timeout (object);
}

/**
 * adapter1_set_discoverable_timeout: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.DiscoverableTimeout">"DiscoverableTimeout"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
adapter1_set_discoverable_timeout (Adapter1 *object, guint value)
{
  g_object_set (G_OBJECT (object), "discoverable-timeout", value, NULL);
}

/**
 * adapter1_get_pairable: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Pairable">"Pairable"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
adapter1_get_pairable (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_pairable (object);
}

/**
 * adapter1_set_pairable: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Pairable">"Pairable"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
adapter1_set_pairable (Adapter1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "pairable", value, NULL);
}

/**
 * adapter1_get_pairable_timeout: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.PairableTimeout">"PairableTimeout"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
guint 
adapter1_get_pairable_timeout (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_pairable_timeout (object);
}

/**
 * adapter1_set_pairable_timeout: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.PairableTimeout">"PairableTimeout"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
adapter1_set_pairable_timeout (Adapter1 *object, guint value)
{
  g_object_set (G_OBJECT (object), "pairable-timeout", value, NULL);
}

/**
 * adapter1_get_discovering: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Discovering">"Discovering"</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 
adapter1_get_discovering (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_discovering (object);
}

/**
 * adapter1_set_discovering: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Discovering">"Discovering"</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
adapter1_set_discovering (Adapter1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "discovering", value, NULL);
}

/**
 * adapter1_get_uuids: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.UUIDs">"UUIDs"</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.
 *
 * <warning>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 adapter1_dup_uuids() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *const *
adapter1_get_uuids (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_uuids (object);
}

/**
 * adapter1_dup_uuids: (skip)
 * @object: A #Adapter1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Adapter1.UUIDs">"UUIDs"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
 */
gchar **
adapter1_dup_uuids (Adapter1 *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "uuids", &value, NULL);
  return value;
}

/**
 * adapter1_set_uuids: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.UUIDs">"UUIDs"</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
adapter1_set_uuids (Adapter1 *object, const gchar *const *value)
{
  g_object_set (G_OBJECT (object), "uuids", value, NULL);
}

/**
 * adapter1_get_modalias: (skip)
 * @object: A #Adapter1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Adapter1.Modalias">"Modalias"</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.
 *
 * <warning>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 adapter1_dup_modalias() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
adapter1_get_modalias (Adapter1 *object)
{
  return ADAPTER1_GET_IFACE (object)->get_modalias (object);
}

/**
 * adapter1_dup_modalias: (skip)
 * @object: A #Adapter1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Adapter1.Modalias">"Modalias"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
adapter1_dup_modalias (Adapter1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "modalias", &value, NULL);
  return value;
}

/**
 * adapter1_set_modalias: (skip)
 * @object: A #Adapter1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Adapter1.Modalias">"Modalias"</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
adapter1_set_modalias (Adapter1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "modalias", value, NULL);
}

/**
 * adapter1_call_start_discovery:
 * @proxy: A #Adapter1Proxy.
 * @cancellable: (allow-none): 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-bluez-Adapter1.StartDiscovery">StartDiscovery()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call adapter1_call_start_discovery_finish() to get the result of the operation.
 *
 * See adapter1_call_start_discovery_sync() for the synchronous, blocking version of this method.
 */
void
adapter1_call_start_discovery (
    Adapter1 *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "StartDiscovery",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * adapter1_call_start_discovery_sync:
 * @proxy: A #Adapter1Proxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Adapter1.StartDiscovery">StartDiscovery()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See adapter1_call_start_discovery() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
adapter1_call_start_discovery_sync (
    Adapter1 *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "StartDiscovery",
    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;
}

/**
 * adapter1_call_stop_discovery:
 * @proxy: A #Adapter1Proxy.
 * @cancellable: (allow-none): 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-bluez-Adapter1.StopDiscovery">StopDiscovery()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call adapter1_call_stop_discovery_finish() to get the result of the operation.
 *
 * See adapter1_call_stop_discovery_sync() for the synchronous, blocking version of this method.
 */
void
adapter1_call_stop_discovery (
    Adapter1 *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "StopDiscovery",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * adapter1_call_stop_discovery_sync:
 * @proxy: A #Adapter1Proxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Adapter1.StopDiscovery">StopDiscovery()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See adapter1_call_stop_discovery() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
adapter1_call_stop_discovery_sync (
    Adapter1 *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "StopDiscovery",
    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;
}

/**
 * adapter1_call_remove_device:
 * @proxy: A #Adapter1Proxy.
 * @arg_device: Argument to pass with the method invocation.
 * @cancellable: (allow-none): 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-bluez-Adapter1.RemoveDevice">RemoveDevice()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call adapter1_call_remove_device_finish() to get the result of the operation.
 *
 * See adapter1_call_remove_device_sync() for the synchronous, blocking version of this method.
 */
void
adapter1_call_remove_device (
    Adapter1 *proxy,
    const gchar *arg_device,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RemoveDevice",
    g_variant_new ("(o)",
                   arg_device),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * adapter1_call_remove_device_sync:
 * @proxy: A #Adapter1Proxy.
 * @arg_device: Argument to pass with the method invocation.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Adapter1.RemoveDevice">RemoveDevice()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See adapter1_call_remove_device() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
adapter1_call_remove_device_sync (
    Adapter1 *proxy,
    const gchar *arg_device,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RemoveDevice",
    g_variant_new ("(o)",
                   arg_device),
    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;
}

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

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

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

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

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

/**
 * Adapter1ProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #Adapter1Proxy.
 */

struct _Adapter1ProxyPrivate
{
  GData *qdata;
};

static void adapter1_proxy_iface_init (Adapter1Iface *iface);

G_DEFINE_TYPE_WITH_CODE (Adapter1Proxy, adapter1_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (Adapter1Proxy)
                         G_IMPLEMENT_INTERFACE (TYPE_ADAPTER1, adapter1_proxy_iface_init));

static void
adapter1_proxy_finalize (GObject *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (adapter1_proxy_parent_class)->finalize (object);
}

static void
adapter1_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 < 12);
  info = _adapter1_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
adapter1_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  error = NULL;
  if (!g_dbus_proxy_call_finish (proxy, res, &error))
    {
      g_warning ("Error setting property '%s' on interface org.bluez.Adapter1: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
}

static void
adapter1_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 < 12);
  info = _adapter1_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.bluez.Adapter1", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) adapter1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
adapter1_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;
  guint num_params;
  guint n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_adapter1_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], TYPE_ADAPTER1);
  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, TYPE_ADAPTER1);
  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
adapter1_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  Adapter1Proxy *proxy = ADAPTER1_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 *) &_adapter1_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 *) &_adapter1_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 *
adapter1_proxy_get_address (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Address");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
adapter1_proxy_get_name (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Name");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
adapter1_proxy_get_alias (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Alias");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
adapter1_proxy_get_class (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Class");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
adapter1_proxy_get_powered (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Powered");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
adapter1_proxy_get_discoverable (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Discoverable");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
adapter1_proxy_get_discoverable_timeout (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "DiscoverableTimeout");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
adapter1_proxy_get_pairable (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Pairable");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
adapter1_proxy_get_pairable_timeout (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PairableTimeout");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
adapter1_proxy_get_discovering (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Discovering");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *const *
adapter1_proxy_get_uuids (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  const gchar *const *value = NULL;
  value = g_datalist_get_data (&proxy->priv->qdata, "UUIDs");
  if (value != NULL)
    return value;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "UUIDs");
  if (variant != NULL)
    {
      value = g_variant_get_strv (variant, NULL);
      g_datalist_set_data_full (&proxy->priv->qdata, "UUIDs", (gpointer) value, g_free);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
adapter1_proxy_get_modalias (Adapter1 *object)
{
  Adapter1Proxy *proxy = ADAPTER1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Modalias");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static void
adapter1_proxy_init (Adapter1Proxy *proxy)
{
  proxy->priv = adapter1_proxy_get_instance_private (proxy);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), adapter1_interface_info ());
}

static void
adapter1_proxy_class_init (Adapter1ProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = adapter1_proxy_finalize;
  gobject_class->get_property = adapter1_proxy_get_property;
  gobject_class->set_property = adapter1_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = adapter1_proxy_g_signal;
  proxy_class->g_properties_changed = adapter1_proxy_g_properties_changed;


  adapter1_override_properties (gobject_class, 1);
}

static void
adapter1_proxy_iface_init (Adapter1Iface *iface)
{
  iface->get_address = adapter1_proxy_get_address;
  iface->get_name = adapter1_proxy_get_name;
  iface->get_alias = adapter1_proxy_get_alias;
  iface->get_class = adapter1_proxy_get_class;
  iface->get_powered = adapter1_proxy_get_powered;
  iface->get_discoverable = adapter1_proxy_get_discoverable;
  iface->get_discoverable_timeout = adapter1_proxy_get_discoverable_timeout;
  iface->get_pairable = adapter1_proxy_get_pairable;
  iface->get_pairable_timeout = adapter1_proxy_get_pairable_timeout;
  iface->get_discovering = adapter1_proxy_get_discovering;
  iface->get_uuids = adapter1_proxy_get_uuids;
  iface->get_modalias = adapter1_proxy_get_modalias;
}

/**
 * adapter1_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (allow-none): 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-bluez-Adapter1.top_of_page">org.bluez.Adapter1</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call adapter1_proxy_new_finish() to get the result of the operation.
 *
 * See adapter1_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
adapter1_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 (TYPE_ADAPTER1_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.bluez.Adapter1", NULL);
}

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

/**
 * adapter1_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (allow-none): 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-bluez-Adapter1.top_of_page">org.bluez.Adapter1</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See adapter1_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type Adapter1Proxy): The constructed proxy object or %NULL if @error is set.
 */
Adapter1 *
adapter1_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (TYPE_ADAPTER1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.bluez.Adapter1", NULL);
  if (ret != NULL)
    return ADAPTER1 (ret);
  else
    return NULL;
}


/**
 * adapter1_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: (allow-none): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like adapter1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call adapter1_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See adapter1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
adapter1_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 (TYPE_ADAPTER1_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.bluez.Adapter1", NULL);
}

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

/**
 * adapter1_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: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like adapter1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See adapter1_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type Adapter1Proxy): The constructed proxy object or %NULL if @error is set.
 */
Adapter1 *
adapter1_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 (TYPE_ADAPTER1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.bluez.Adapter1", NULL);
  if (ret != NULL)
    return ADAPTER1 (ret);
  else
    return NULL;
}


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

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

/**
 * Adapter1SkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #Adapter1Skeleton.
 */

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

static void
_adapter1_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)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  guint num_params;
  guint num_extra;
  guint 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], TYPE_ADAPTER1);
  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, TYPE_ADAPTER1);
  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 *
_adapter1_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)
{
  Adapter1Skeleton *skeleton = ADAPTER1_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 *) &_adapter1_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
_adapter1_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)
{
  Adapter1Skeleton *skeleton = ADAPTER1_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 *) &_adapter1_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 _adapter1_skeleton_vtable =
{
  _adapter1_skeleton_handle_method_call,
  _adapter1_skeleton_handle_get_property,
  _adapter1_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
adapter1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return adapter1_interface_info ();
}

static GDBusInterfaceVTable *
adapter1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_adapter1_skeleton_vtable;
}

static GVariant *
adapter1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_adapter1_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _adapter1_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _adapter1_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _adapter1_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.bluez.Adapter1", 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 _adapter1_emit_changed (gpointer user_data);

static void
adapter1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  Adapter1Skeleton *skeleton = ADAPTER1_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)
    _adapter1_emit_changed (skeleton);
}

static void adapter1_skeleton_iface_init (Adapter1Iface *iface);
G_DEFINE_TYPE_WITH_CODE (Adapter1Skeleton, adapter1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (Adapter1Skeleton)
                         G_IMPLEMENT_INTERFACE (TYPE_ADAPTER1, adapter1_skeleton_iface_init));

static void
adapter1_skeleton_finalize (GObject *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  guint n;
  for (n = 0; n < 12; 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 (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (adapter1_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_adapter1_emit_changed (gpointer user_data)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
  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.bluez.Adapter1",
                                           &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
_adapter1_schedule_emit_changed (Adapter1Skeleton *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
adapter1_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  Adapter1Skeleton *skeleton = ADAPTER1_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, _adapter1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      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
adapter1_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 12);
  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)
        _adapter1_schedule_emit_changed (skeleton, _adapter1_property_info_pointers[prop_id - 1], 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
adapter1_skeleton_init (Adapter1Skeleton *skeleton)
{
  skeleton->priv = adapter1_skeleton_get_instance_private (skeleton);
  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 12);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[5], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[6], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[7], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[8], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[9], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[10], G_TYPE_STRV);
  g_value_init (&skeleton->priv->properties[11], G_TYPE_STRING);
}

static const gchar *
adapter1_skeleton_get_address (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
adapter1_skeleton_get_name (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
adapter1_skeleton_get_alias (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
adapter1_skeleton_get_class (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
adapter1_skeleton_get_powered (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
adapter1_skeleton_get_discoverable (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[5]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
adapter1_skeleton_get_discoverable_timeout (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint (&(skeleton->priv->properties[6]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
adapter1_skeleton_get_pairable (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[7]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
adapter1_skeleton_get_pairable_timeout (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint (&(skeleton->priv->properties[8]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
adapter1_skeleton_get_discovering (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[9]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *const *
adapter1_skeleton_get_uuids (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  const gchar *const *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boxed (&(skeleton->priv->properties[10]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
adapter1_skeleton_get_modalias (Adapter1 *object)
{
  Adapter1Skeleton *skeleton = ADAPTER1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[11]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
adapter1_skeleton_class_init (Adapter1SkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = adapter1_skeleton_finalize;
  gobject_class->get_property = adapter1_skeleton_get_property;
  gobject_class->set_property = adapter1_skeleton_set_property;
  gobject_class->notify       = adapter1_skeleton_notify;


  adapter1_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = adapter1_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = adapter1_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = adapter1_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = adapter1_skeleton_dbus_interface_get_vtable;
}

static void
adapter1_skeleton_iface_init (Adapter1Iface *iface)
{
  iface->get_address = adapter1_skeleton_get_address;
  iface->get_name = adapter1_skeleton_get_name;
  iface->get_alias = adapter1_skeleton_get_alias;
  iface->get_class = adapter1_skeleton_get_class;
  iface->get_powered = adapter1_skeleton_get_powered;
  iface->get_discoverable = adapter1_skeleton_get_discoverable;
  iface->get_discoverable_timeout = adapter1_skeleton_get_discoverable_timeout;
  iface->get_pairable = adapter1_skeleton_get_pairable;
  iface->get_pairable_timeout = adapter1_skeleton_get_pairable_timeout;
  iface->get_discovering = adapter1_skeleton_get_discovering;
  iface->get_uuids = adapter1_skeleton_get_uuids;
  iface->get_modalias = adapter1_skeleton_get_modalias;
}

/**
 * adapter1_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-bluez-Adapter1.top_of_page">org.bluez.Adapter1</link>.
 *
 * Returns: (transfer full) (type Adapter1Skeleton): The skeleton object.
 */
Adapter1 *
adapter1_skeleton_new (void)
{
  return ADAPTER1 (g_object_new (TYPE_ADAPTER1_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.bluez.Device1
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.bluez.Device1 ---- */

static const _ExtendedGDBusMethodInfo _device1_method_info_disconnect =
{
  {
    -1,
    (gchar *) "Disconnect",
    NULL,
    NULL,
    NULL
  },
  "handle-disconnect",
  FALSE
};

static const _ExtendedGDBusMethodInfo _device1_method_info_connect =
{
  {
    -1,
    (gchar *) "Connect",
    NULL,
    NULL,
    NULL
  },
  "handle-connect",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _device1_method_info_connect_profile_IN_ARG_pointers[] =
{
  &_device1_method_info_connect_profile_IN_ARG_UUID,
  NULL
};

static const _ExtendedGDBusMethodInfo _device1_method_info_connect_profile =
{
  {
    -1,
    (gchar *) "ConnectProfile",
    (GDBusArgInfo **) &_device1_method_info_connect_profile_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-connect-profile",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _device1_method_info_disconnect_profile_IN_ARG_pointers[] =
{
  &_device1_method_info_disconnect_profile_IN_ARG_UUID,
  NULL
};

static const _ExtendedGDBusMethodInfo _device1_method_info_disconnect_profile =
{
  {
    -1,
    (gchar *) "DisconnectProfile",
    (GDBusArgInfo **) &_device1_method_info_disconnect_profile_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-disconnect-profile",
  FALSE
};

static const _ExtendedGDBusMethodInfo _device1_method_info_pair =
{
  {
    -1,
    (gchar *) "Pair",
    NULL,
    NULL,
    NULL
  },
  "handle-pair",
  FALSE
};

static const _ExtendedGDBusMethodInfo _device1_method_info_cancel_pairing =
{
  {
    -1,
    (gchar *) "CancelPairing",
    NULL,
    NULL,
    NULL
  },
  "handle-cancel-pairing",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _device1_method_info_pointers[] =
{
  &_device1_method_info_disconnect,
  &_device1_method_info_connect,
  &_device1_method_info_connect_profile,
  &_device1_method_info_disconnect_profile,
  &_device1_method_info_pair,
  &_device1_method_info_cancel_pairing,
  NULL
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_address =
{
  {
    -1,
    (gchar *) "Address",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "address",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_name =
{
  {
    -1,
    (gchar *) "Name",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "name",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_alias =
{
  {
    -1,
    (gchar *) "Alias",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "alias",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_class =
{
  {
    -1,
    (gchar *) "Class",
    (gchar *) "u",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "class",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_appearance =
{
  {
    -1,
    (gchar *) "Appearance",
    (gchar *) "q",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "appearance",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_icon =
{
  {
    -1,
    (gchar *) "Icon",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "icon",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_paired =
{
  {
    -1,
    (gchar *) "Paired",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "paired",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_trusted =
{
  {
    -1,
    (gchar *) "Trusted",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "trusted",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_blocked =
{
  {
    -1,
    (gchar *) "Blocked",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "blocked",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_legacy_pairing =
{
  {
    -1,
    (gchar *) "LegacyPairing",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "legacy-pairing",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_rssi =
{
  {
    -1,
    (gchar *) "RSSI",
    (gchar *) "n",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "rssi",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_connected =
{
  {
    -1,
    (gchar *) "Connected",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "connected",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_uuids =
{
  {
    -1,
    (gchar *) "UUIDs",
    (gchar *) "as",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "uuids",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_modalias =
{
  {
    -1,
    (gchar *) "Modalias",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "modalias",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _device1_property_info_adapter =
{
  {
    -1,
    (gchar *) "Adapter",
    (gchar *) "o",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "adapter",
  FALSE
};

static const _ExtendedGDBusPropertyInfo * const _device1_property_info_pointers[] =
{
  &_device1_property_info_address,
  &_device1_property_info_name,
  &_device1_property_info_alias,
  &_device1_property_info_class,
  &_device1_property_info_appearance,
  &_device1_property_info_icon,
  &_device1_property_info_paired,
  &_device1_property_info_trusted,
  &_device1_property_info_blocked,
  &_device1_property_info_legacy_pairing,
  &_device1_property_info_rssi,
  &_device1_property_info_connected,
  &_device1_property_info_uuids,
  &_device1_property_info_modalias,
  &_device1_property_info_adapter,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _device1_interface_info =
{
  {
    -1,
    (gchar *) "org.bluez.Device1",
    (GDBusMethodInfo **) &_device1_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_device1_property_info_pointers,
    NULL
  },
  "device1",
};


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

/**
 * device1_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 #Device1 interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
device1_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "address");
  g_object_class_override_property (klass, property_id_begin++, "name");
  g_object_class_override_property (klass, property_id_begin++, "alias");
  g_object_class_override_property (klass, property_id_begin++, "class");
  g_object_class_override_property (klass, property_id_begin++, "appearance");
  g_object_class_override_property (klass, property_id_begin++, "icon");
  g_object_class_override_property (klass, property_id_begin++, "paired");
  g_object_class_override_property (klass, property_id_begin++, "trusted");
  g_object_class_override_property (klass, property_id_begin++, "blocked");
  g_object_class_override_property (klass, property_id_begin++, "legacy-pairing");
  g_object_class_override_property (klass, property_id_begin++, "rssi");
  g_object_class_override_property (klass, property_id_begin++, "connected");
  g_object_class_override_property (klass, property_id_begin++, "uuids");
  g_object_class_override_property (klass, property_id_begin++, "modalias");
  g_object_class_override_property (klass, property_id_begin++, "adapter");
  return property_id_begin - 1;
}



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

/**
 * Device1Iface:
 * @parent_iface: The parent interface.
 * @handle_cancel_pairing: Handler for the #Device1::handle-cancel-pairing signal.
 * @handle_connect: Handler for the #Device1::handle-connect signal.
 * @handle_connect_profile: Handler for the #Device1::handle-connect-profile signal.
 * @handle_disconnect: Handler for the #Device1::handle-disconnect signal.
 * @handle_disconnect_profile: Handler for the #Device1::handle-disconnect-profile signal.
 * @handle_pair: Handler for the #Device1::handle-pair signal.
 * @get_adapter: Getter for the #Device1:adapter property.
 * @get_address: Getter for the #Device1:address property.
 * @get_alias: Getter for the #Device1:alias property.
 * @get_appearance: Getter for the #Device1:appearance property.
 * @get_blocked: Getter for the #Device1:blocked property.
 * @get_class: Getter for the #Device1:class property.
 * @get_connected: Getter for the #Device1:connected property.
 * @get_icon: Getter for the #Device1:icon property.
 * @get_legacy_pairing: Getter for the #Device1:legacy-pairing property.
 * @get_modalias: Getter for the #Device1:modalias property.
 * @get_name: Getter for the #Device1:name property.
 * @get_paired: Getter for the #Device1:paired property.
 * @get_rssi: Getter for the #Device1:rssi property.
 * @get_trusted: Getter for the #Device1:trusted property.
 * @get_uuids: Getter for the #Device1:uuids property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-bluez-Device1.top_of_page">org.bluez.Device1</link>.
 */

typedef Device1Iface Device1Interface;
G_DEFINE_INTERFACE (Device1, device1, G_TYPE_OBJECT);

static void
device1_default_init (Device1Iface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * Device1::handle-disconnect:
   * @object: A #Device1.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Device1.Disconnect">Disconnect()</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 device1_complete_disconnect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-disconnect",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Device1Iface, handle_disconnect),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * Device1::handle-connect:
   * @object: A #Device1.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Device1.Connect">Connect()</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 device1_complete_connect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-connect",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Device1Iface, handle_connect),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * Device1::handle-connect-profile:
   * @object: A #Device1.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_UUID: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Device1.ConnectProfile">ConnectProfile()</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 device1_complete_connect_profile() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-connect-profile",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Device1Iface, handle_connect_profile),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * Device1::handle-disconnect-profile:
   * @object: A #Device1.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_UUID: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Device1.DisconnectProfile">DisconnectProfile()</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 device1_complete_disconnect_profile() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-disconnect-profile",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Device1Iface, handle_disconnect_profile),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * Device1::handle-pair:
   * @object: A #Device1.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Device1.Pair">Pair()</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 device1_complete_pair() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-pair",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Device1Iface, handle_pair),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * Device1::handle-cancel-pairing:
   * @object: A #Device1.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-Device1.CancelPairing">CancelPairing()</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 device1_complete_cancel_pairing() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-cancel-pairing",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (Device1Iface, handle_cancel_pairing),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject properties for D-Bus properties: */
  /**
   * Device1:address:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Address">"Address"</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 ("address", "Address", "Address", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:name:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Name">"Name"</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 ("name", "Name", "Name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:alias:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Alias">"Alias"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_string ("alias", "Alias", "Alias", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:class:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Class">"Class"</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 ("class", "Class", "Class", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:appearance:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Appearance">"Appearance"</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 ("appearance", "Appearance", "Appearance", 0, G_MAXUINT16, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:icon:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Icon">"Icon"</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 ("icon", "Icon", "Icon", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:paired:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Paired">"Paired"</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 ("paired", "Paired", "Paired", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:trusted:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Trusted">"Trusted"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("trusted", "Trusted", "Trusted", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:blocked:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Blocked">"Blocked"</link>.
   *
   * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_boolean ("blocked", "Blocked", "Blocked", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:legacy-pairing:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.LegacyPairing">"LegacyPairing"</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 ("legacy-pairing", "LegacyPairing", "LegacyPairing", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:rssi:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.RSSI">"RSSI"</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 ("rssi", "RSSI", "RSSI", G_MININT16, G_MAXINT16, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:connected:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Connected">"Connected"</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 ("connected", "Connected", "Connected", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:uuids:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.UUIDs">"UUIDs"</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_boxed ("uuids", "UUIDs", "UUIDs", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:modalias:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Modalias">"Modalias"</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 ("modalias", "Modalias", "Modalias", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * Device1:adapter:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-bluez-Device1.Adapter">"Adapter"</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 ("adapter", "Adapter", "Adapter", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * device1_get_address: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Address">"Address"</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.
 *
 * <warning>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 device1_dup_address() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
device1_get_address (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_address (object);
}

/**
 * device1_dup_address: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.Address">"Address"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
device1_dup_address (Device1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "address", &value, NULL);
  return value;
}

/**
 * device1_set_address: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Address">"Address"</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
device1_set_address (Device1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "address", value, NULL);
}

/**
 * device1_get_name: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Name">"Name"</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.
 *
 * <warning>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 device1_dup_name() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
device1_get_name (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_name (object);
}

/**
 * device1_dup_name: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.Name">"Name"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
device1_dup_name (Device1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "name", &value, NULL);
  return value;
}

/**
 * device1_set_name: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Name">"Name"</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
device1_set_name (Device1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "name", value, NULL);
}

/**
 * device1_get_alias: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Alias">"Alias"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * <warning>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 device1_dup_alias() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
device1_get_alias (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_alias (object);
}

/**
 * device1_dup_alias: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.Alias">"Alias"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
device1_dup_alias (Device1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "alias", &value, NULL);
  return value;
}

/**
 * device1_set_alias: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Alias">"Alias"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
device1_set_alias (Device1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "alias", value, NULL);
}

/**
 * device1_get_class: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Class">"Class"</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 
device1_get_class (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_class (object);
}

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

/**
 * device1_get_appearance: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Appearance">"Appearance"</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.
 */
guint16 
device1_get_appearance (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_appearance (object);
}

/**
 * device1_set_appearance: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Appearance">"Appearance"</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
device1_set_appearance (Device1 *object, guint16 value)
{
  g_object_set (G_OBJECT (object), "appearance", value, NULL);
}

/**
 * device1_get_icon: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Icon">"Icon"</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.
 *
 * <warning>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 device1_dup_icon() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
device1_get_icon (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_icon (object);
}

/**
 * device1_dup_icon: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.Icon">"Icon"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
device1_dup_icon (Device1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "icon", &value, NULL);
  return value;
}

/**
 * device1_set_icon: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Icon">"Icon"</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
device1_set_icon (Device1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "icon", value, NULL);
}

/**
 * device1_get_paired: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Paired">"Paired"</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 
device1_get_paired (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_paired (object);
}

/**
 * device1_set_paired: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Paired">"Paired"</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
device1_set_paired (Device1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "paired", value, NULL);
}

/**
 * device1_get_trusted: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Trusted">"Trusted"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
device1_get_trusted (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_trusted (object);
}

/**
 * device1_set_trusted: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Trusted">"Trusted"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
device1_set_trusted (Device1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "trusted", value, NULL);
}

/**
 * device1_get_blocked: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Blocked">"Blocked"</link> D-Bus property.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 *
 * Returns: The property value.
 */
gboolean 
device1_get_blocked (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_blocked (object);
}

/**
 * device1_set_blocked: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Blocked">"Blocked"</link> D-Bus property to @value.
 *
 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
 */
void
device1_set_blocked (Device1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "blocked", value, NULL);
}

/**
 * device1_get_legacy_pairing: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.LegacyPairing">"LegacyPairing"</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 
device1_get_legacy_pairing (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_legacy_pairing (object);
}

/**
 * device1_set_legacy_pairing: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.LegacyPairing">"LegacyPairing"</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
device1_set_legacy_pairing (Device1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "legacy-pairing", value, NULL);
}

/**
 * device1_get_rssi: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.RSSI">"RSSI"</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.
 */
gint16 
device1_get_rssi (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_rssi (object);
}

/**
 * device1_set_rssi: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.RSSI">"RSSI"</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
device1_set_rssi (Device1 *object, gint16 value)
{
  g_object_set (G_OBJECT (object), "rssi", value, NULL);
}

/**
 * device1_get_connected: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Connected">"Connected"</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 
device1_get_connected (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_connected (object);
}

/**
 * device1_set_connected: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Connected">"Connected"</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
device1_set_connected (Device1 *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "connected", value, NULL);
}

/**
 * device1_get_uuids: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.UUIDs">"UUIDs"</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.
 *
 * <warning>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 device1_dup_uuids() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *const *
device1_get_uuids (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_uuids (object);
}

/**
 * device1_dup_uuids: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.UUIDs">"UUIDs"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
 */
gchar **
device1_dup_uuids (Device1 *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "uuids", &value, NULL);
  return value;
}

/**
 * device1_set_uuids: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.UUIDs">"UUIDs"</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
device1_set_uuids (Device1 *object, const gchar *const *value)
{
  g_object_set (G_OBJECT (object), "uuids", value, NULL);
}

/**
 * device1_get_modalias: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Modalias">"Modalias"</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.
 *
 * <warning>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 device1_dup_modalias() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
device1_get_modalias (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_modalias (object);
}

/**
 * device1_dup_modalias: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.Modalias">"Modalias"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
device1_dup_modalias (Device1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "modalias", &value, NULL);
  return value;
}

/**
 * device1_set_modalias: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Modalias">"Modalias"</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
device1_set_modalias (Device1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "modalias", value, NULL);
}

/**
 * device1_get_adapter: (skip)
 * @object: A #Device1.
 *
 * Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Adapter">"Adapter"</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.
 *
 * <warning>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 device1_dup_adapter() if on another thread.</warning>
 *
 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
device1_get_adapter (Device1 *object)
{
  return DEVICE1_GET_IFACE (object)->get_adapter (object);
}

/**
 * device1_dup_adapter: (skip)
 * @object: A #Device1.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-bluez-Device1.Adapter">"Adapter"</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): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
device1_dup_adapter (Device1 *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "adapter", &value, NULL);
  return value;
}

/**
 * device1_set_adapter: (skip)
 * @object: A #Device1.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-bluez-Device1.Adapter">"Adapter"</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
device1_set_adapter (Device1 *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "adapter", value, NULL);
}

/**
 * device1_call_disconnect:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): 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-bluez-Device1.Disconnect">Disconnect()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_call_disconnect_finish() to get the result of the operation.
 *
 * See device1_call_disconnect_sync() for the synchronous, blocking version of this method.
 */
void
device1_call_disconnect (
    Device1 *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Disconnect",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * device1_call_disconnect_sync:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Device1.Disconnect">Disconnect()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See device1_call_disconnect() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
device1_call_disconnect_sync (
    Device1 *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Disconnect",
    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;
}

/**
 * device1_call_connect:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): 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-bluez-Device1.Connect">Connect()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_call_connect_finish() to get the result of the operation.
 *
 * See device1_call_connect_sync() for the synchronous, blocking version of this method.
 */
void
device1_call_connect (
    Device1 *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Connect",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * device1_call_connect_sync:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Device1.Connect">Connect()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See device1_call_connect() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
device1_call_connect_sync (
    Device1 *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Connect",
    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;
}

/**
 * device1_call_connect_profile:
 * @proxy: A #Device1Proxy.
 * @arg_UUID: Argument to pass with the method invocation.
 * @cancellable: (allow-none): 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-bluez-Device1.ConnectProfile">ConnectProfile()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_call_connect_profile_finish() to get the result of the operation.
 *
 * See device1_call_connect_profile_sync() for the synchronous, blocking version of this method.
 */
void
device1_call_connect_profile (
    Device1 *proxy,
    const gchar *arg_UUID,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ConnectProfile",
    g_variant_new ("(s)",
                   arg_UUID),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * device1_call_connect_profile_sync:
 * @proxy: A #Device1Proxy.
 * @arg_UUID: Argument to pass with the method invocation.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Device1.ConnectProfile">ConnectProfile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See device1_call_connect_profile() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
device1_call_connect_profile_sync (
    Device1 *proxy,
    const gchar *arg_UUID,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ConnectProfile",
    g_variant_new ("(s)",
                   arg_UUID),
    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;
}

/**
 * device1_call_disconnect_profile:
 * @proxy: A #Device1Proxy.
 * @arg_UUID: Argument to pass with the method invocation.
 * @cancellable: (allow-none): 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-bluez-Device1.DisconnectProfile">DisconnectProfile()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_call_disconnect_profile_finish() to get the result of the operation.
 *
 * See device1_call_disconnect_profile_sync() for the synchronous, blocking version of this method.
 */
void
device1_call_disconnect_profile (
    Device1 *proxy,
    const gchar *arg_UUID,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "DisconnectProfile",
    g_variant_new ("(s)",
                   arg_UUID),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * device1_call_disconnect_profile_sync:
 * @proxy: A #Device1Proxy.
 * @arg_UUID: Argument to pass with the method invocation.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Device1.DisconnectProfile">DisconnectProfile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See device1_call_disconnect_profile() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
device1_call_disconnect_profile_sync (
    Device1 *proxy,
    const gchar *arg_UUID,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "DisconnectProfile",
    g_variant_new ("(s)",
                   arg_UUID),
    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;
}

/**
 * device1_call_pair:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): 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-bluez-Device1.Pair">Pair()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_call_pair_finish() to get the result of the operation.
 *
 * See device1_call_pair_sync() for the synchronous, blocking version of this method.
 */
void
device1_call_pair (
    Device1 *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Pair",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * device1_call_pair_sync:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Device1.Pair">Pair()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See device1_call_pair() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
device1_call_pair_sync (
    Device1 *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Pair",
    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;
}

/**
 * device1_call_cancel_pairing:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): 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-bluez-Device1.CancelPairing">CancelPairing()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_call_cancel_pairing_finish() to get the result of the operation.
 *
 * See device1_call_cancel_pairing_sync() for the synchronous, blocking version of this method.
 */
void
device1_call_cancel_pairing (
    Device1 *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CancelPairing",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * device1_call_cancel_pairing_sync:
 * @proxy: A #Device1Proxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-Device1.CancelPairing">CancelPairing()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See device1_call_cancel_pairing() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
device1_call_cancel_pairing_sync (
    Device1 *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CancelPairing",
    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;
}

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

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

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

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

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

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

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

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

/**
 * Device1ProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #Device1Proxy.
 */

struct _Device1ProxyPrivate
{
  GData *qdata;
};

static void device1_proxy_iface_init (Device1Iface *iface);

G_DEFINE_TYPE_WITH_CODE (Device1Proxy, device1_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (Device1Proxy)
                         G_IMPLEMENT_INTERFACE (TYPE_DEVICE1, device1_proxy_iface_init));

static void
device1_proxy_finalize (GObject *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (device1_proxy_parent_class)->finalize (object);
}

static void
device1_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 < 15);
  info = _device1_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
device1_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  error = NULL;
  if (!g_dbus_proxy_call_finish (proxy, res, &error))
    {
      g_warning ("Error setting property '%s' on interface org.bluez.Device1: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
}

static void
device1_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 < 15);
  info = _device1_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.bluez.Device1", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) device1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
device1_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;
  guint num_params;
  guint n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_device1_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], TYPE_DEVICE1);
  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, TYPE_DEVICE1);
  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
device1_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  Device1Proxy *proxy = DEVICE1_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 *) &_device1_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 *) &_device1_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 *
device1_proxy_get_address (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Address");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
device1_proxy_get_name (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Name");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
device1_proxy_get_alias (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Alias");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static guint 
device1_proxy_get_class (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  guint value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Class");
  if (variant != NULL)
    {
      value = g_variant_get_uint32 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint16 
device1_proxy_get_appearance (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  guint16 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Appearance");
  if (variant != NULL)
    {
      value = g_variant_get_uint16 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
device1_proxy_get_icon (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Icon");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
device1_proxy_get_paired (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Paired");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
device1_proxy_get_trusted (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Trusted");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
device1_proxy_get_blocked (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Blocked");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
device1_proxy_get_legacy_pairing (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LegacyPairing");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gint16 
device1_proxy_get_rssi (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  gint16 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RSSI");
  if (variant != NULL)
    {
      value = g_variant_get_int16 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
device1_proxy_get_connected (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Connected");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *const *
device1_proxy_get_uuids (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *const *value = NULL;
  value = g_datalist_get_data (&proxy->priv->qdata, "UUIDs");
  if (value != NULL)
    return value;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "UUIDs");
  if (variant != NULL)
    {
      value = g_variant_get_strv (variant, NULL);
      g_datalist_set_data_full (&proxy->priv->qdata, "UUIDs", (gpointer) value, g_free);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
device1_proxy_get_modalias (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Modalias");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
device1_proxy_get_adapter (Device1 *object)
{
  Device1Proxy *proxy = DEVICE1_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Adapter");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static void
device1_proxy_init (Device1Proxy *proxy)
{
  proxy->priv = device1_proxy_get_instance_private (proxy);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), device1_interface_info ());
}

static void
device1_proxy_class_init (Device1ProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = device1_proxy_finalize;
  gobject_class->get_property = device1_proxy_get_property;
  gobject_class->set_property = device1_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = device1_proxy_g_signal;
  proxy_class->g_properties_changed = device1_proxy_g_properties_changed;


  device1_override_properties (gobject_class, 1);
}

static void
device1_proxy_iface_init (Device1Iface *iface)
{
  iface->get_address = device1_proxy_get_address;
  iface->get_name = device1_proxy_get_name;
  iface->get_alias = device1_proxy_get_alias;
  iface->get_class = device1_proxy_get_class;
  iface->get_appearance = device1_proxy_get_appearance;
  iface->get_icon = device1_proxy_get_icon;
  iface->get_paired = device1_proxy_get_paired;
  iface->get_trusted = device1_proxy_get_trusted;
  iface->get_blocked = device1_proxy_get_blocked;
  iface->get_legacy_pairing = device1_proxy_get_legacy_pairing;
  iface->get_rssi = device1_proxy_get_rssi;
  iface->get_connected = device1_proxy_get_connected;
  iface->get_uuids = device1_proxy_get_uuids;
  iface->get_modalias = device1_proxy_get_modalias;
  iface->get_adapter = device1_proxy_get_adapter;
}

/**
 * device1_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (allow-none): 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-bluez-Device1.top_of_page">org.bluez.Device1</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_proxy_new_finish() to get the result of the operation.
 *
 * See device1_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
device1_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 (TYPE_DEVICE1_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.bluez.Device1", NULL);
}

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

/**
 * device1_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (allow-none): 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-bluez-Device1.top_of_page">org.bluez.Device1</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See device1_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type Device1Proxy): The constructed proxy object or %NULL if @error is set.
 */
Device1 *
device1_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (TYPE_DEVICE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.bluez.Device1", NULL);
  if (ret != NULL)
    return DEVICE1 (ret);
  else
    return NULL;
}


/**
 * device1_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: (allow-none): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like device1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call device1_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See device1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
device1_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 (TYPE_DEVICE1_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.bluez.Device1", NULL);
}

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

/**
 * device1_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: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like device1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See device1_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type Device1Proxy): The constructed proxy object or %NULL if @error is set.
 */
Device1 *
device1_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 (TYPE_DEVICE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.bluez.Device1", NULL);
  if (ret != NULL)
    return DEVICE1 (ret);
  else
    return NULL;
}


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

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

/**
 * Device1SkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #Device1Skeleton.
 */

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

static void
_device1_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)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  guint num_params;
  guint num_extra;
  guint 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], TYPE_DEVICE1);
  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, TYPE_DEVICE1);
  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 *
_device1_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)
{
  Device1Skeleton *skeleton = DEVICE1_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 *) &_device1_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
_device1_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)
{
  Device1Skeleton *skeleton = DEVICE1_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 *) &_device1_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 _device1_skeleton_vtable =
{
  _device1_skeleton_handle_method_call,
  _device1_skeleton_handle_get_property,
  _device1_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
device1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return device1_interface_info ();
}

static GDBusInterfaceVTable *
device1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_device1_skeleton_vtable;
}

static GVariant *
device1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_device1_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _device1_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _device1_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _device1_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.bluez.Device1", 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 _device1_emit_changed (gpointer user_data);

static void
device1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  Device1Skeleton *skeleton = DEVICE1_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)
    _device1_emit_changed (skeleton);
}

static void device1_skeleton_iface_init (Device1Iface *iface);
G_DEFINE_TYPE_WITH_CODE (Device1Skeleton, device1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (Device1Skeleton)
                         G_IMPLEMENT_INTERFACE (TYPE_DEVICE1, device1_skeleton_iface_init));

static void
device1_skeleton_finalize (GObject *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  guint n;
  for (n = 0; n < 15; 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 (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (device1_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_device1_emit_changed (gpointer user_data)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
  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.bluez.Device1",
                                           &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
_device1_schedule_emit_changed (Device1Skeleton *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
device1_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  Device1Skeleton *skeleton = DEVICE1_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, _device1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      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
device1_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 15);
  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)
        _device1_schedule_emit_changed (skeleton, _device1_property_info_pointers[prop_id - 1], 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
device1_skeleton_init (Device1Skeleton *skeleton)
{
  skeleton->priv = device1_skeleton_get_instance_private (skeleton);
  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 15);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_UINT);
  g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[6], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[7], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[8], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[9], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[10], G_TYPE_INT);
  g_value_init (&skeleton->priv->properties[11], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[12], G_TYPE_STRV);
  g_value_init (&skeleton->priv->properties[13], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[14], G_TYPE_STRING);
}

static const gchar *
device1_skeleton_get_address (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
device1_skeleton_get_name (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
device1_skeleton_get_alias (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint 
device1_skeleton_get_class (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint16 
device1_skeleton_get_appearance (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  guint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
device1_skeleton_get_icon (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[5]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
device1_skeleton_get_paired (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[6]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
device1_skeleton_get_trusted (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[7]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
device1_skeleton_get_blocked (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[8]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
device1_skeleton_get_legacy_pairing (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[9]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gint16 
device1_skeleton_get_rssi (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  gint value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_int (&(skeleton->priv->properties[10]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static gboolean 
device1_skeleton_get_connected (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[11]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *const *
device1_skeleton_get_uuids (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *const *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boxed (&(skeleton->priv->properties[12]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
device1_skeleton_get_modalias (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[13]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
device1_skeleton_get_adapter (Device1 *object)
{
  Device1Skeleton *skeleton = DEVICE1_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[14]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
device1_skeleton_class_init (Device1SkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = device1_skeleton_finalize;
  gobject_class->get_property = device1_skeleton_get_property;
  gobject_class->set_property = device1_skeleton_set_property;
  gobject_class->notify       = device1_skeleton_notify;


  device1_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = device1_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = device1_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = device1_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = device1_skeleton_dbus_interface_get_vtable;
}

static void
device1_skeleton_iface_init (Device1Iface *iface)
{
  iface->get_address = device1_skeleton_get_address;
  iface->get_name = device1_skeleton_get_name;
  iface->get_alias = device1_skeleton_get_alias;
  iface->get_class = device1_skeleton_get_class;
  iface->get_appearance = device1_skeleton_get_appearance;
  iface->get_icon = device1_skeleton_get_icon;
  iface->get_paired = device1_skeleton_get_paired;
  iface->get_trusted = device1_skeleton_get_trusted;
  iface->get_blocked = device1_skeleton_get_blocked;
  iface->get_legacy_pairing = device1_skeleton_get_legacy_pairing;
  iface->get_rssi = device1_skeleton_get_rssi;
  iface->get_connected = device1_skeleton_get_connected;
  iface->get_uuids = device1_skeleton_get_uuids;
  iface->get_modalias = device1_skeleton_get_modalias;
  iface->get_adapter = device1_skeleton_get_adapter;
}

/**
 * device1_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-bluez-Device1.top_of_page">org.bluez.Device1</link>.
 *
 * Returns: (transfer full) (type Device1Skeleton): The skeleton object.
 */
Device1 *
device1_skeleton_new (void)
{
  return DEVICE1 (g_object_new (TYPE_DEVICE1_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.bluez.AgentManager1
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.bluez.AgentManager1 ---- */

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

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

static const _ExtendedGDBusArgInfo * const _agent_manager1_method_info_register_agent_IN_ARG_pointers[] =
{
  &_agent_manager1_method_info_register_agent_IN_ARG_agent,
  &_agent_manager1_method_info_register_agent_IN_ARG_capability,
  NULL
};

static const _ExtendedGDBusMethodInfo _agent_manager1_method_info_register_agent =
{
  {
    -1,
    (gchar *) "RegisterAgent",
    (GDBusArgInfo **) &_agent_manager1_method_info_register_agent_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-register-agent",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _agent_manager1_method_info_unregister_agent_IN_ARG_pointers[] =
{
  &_agent_manager1_method_info_unregister_agent_IN_ARG_agent,
  NULL
};

static const _ExtendedGDBusMethodInfo _agent_manager1_method_info_unregister_agent =
{
  {
    -1,
    (gchar *) "UnregisterAgent",
    (GDBusArgInfo **) &_agent_manager1_method_info_unregister_agent_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-unregister-agent",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _agent_manager1_method_info_request_default_agent_IN_ARG_pointers[] =
{
  &_agent_manager1_method_info_request_default_agent_IN_ARG_agent,
  NULL
};

static const _ExtendedGDBusMethodInfo _agent_manager1_method_info_request_default_agent =
{
  {
    -1,
    (gchar *) "RequestDefaultAgent",
    (GDBusArgInfo **) &_agent_manager1_method_info_request_default_agent_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-request-default-agent",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _agent_manager1_method_info_pointers[] =
{
  &_agent_manager1_method_info_register_agent,
  &_agent_manager1_method_info_unregister_agent,
  &_agent_manager1_method_info_request_default_agent,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _agent_manager1_interface_info =
{
  {
    -1,
    (gchar *) "org.bluez.AgentManager1",
    (GDBusMethodInfo **) &_agent_manager1_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "agent-manager1",
};


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

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



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

/**
 * AgentManager1Iface:
 * @parent_iface: The parent interface.
 * @handle_register_agent: Handler for the #AgentManager1::handle-register-agent signal.
 * @handle_request_default_agent: Handler for the #AgentManager1::handle-request-default-agent signal.
 * @handle_unregister_agent: Handler for the #AgentManager1::handle-unregister-agent signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-bluez-AgentManager1.top_of_page">org.bluez.AgentManager1</link>.
 */

typedef AgentManager1Iface AgentManager1Interface;
G_DEFINE_INTERFACE (AgentManager1, agent_manager1, G_TYPE_OBJECT);

static void
agent_manager1_default_init (AgentManager1Iface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * AgentManager1::handle-register-agent:
   * @object: A #AgentManager1.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_agent: Argument passed by remote caller.
   * @arg_capability: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-AgentManager1.RegisterAgent">RegisterAgent()</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 agent_manager1_complete_register_agent() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-register-agent",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (AgentManager1Iface, handle_register_agent),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * AgentManager1::handle-unregister-agent:
   * @object: A #AgentManager1.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_agent: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-AgentManager1.UnregisterAgent">UnregisterAgent()</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 agent_manager1_complete_unregister_agent() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-unregister-agent",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (AgentManager1Iface, handle_unregister_agent),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * AgentManager1::handle-request-default-agent:
   * @object: A #AgentManager1.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_agent: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-bluez-AgentManager1.RequestDefaultAgent">RequestDefaultAgent()</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 agent_manager1_complete_request_default_agent() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-request-default-agent",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (AgentManager1Iface, handle_request_default_agent),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

}

/**
 * agent_manager1_call_register_agent:
 * @proxy: A #AgentManager1Proxy.
 * @arg_agent: Argument to pass with the method invocation.
 * @arg_capability: Argument to pass with the method invocation.
 * @cancellable: (allow-none): 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-bluez-AgentManager1.RegisterAgent">RegisterAgent()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call agent_manager1_call_register_agent_finish() to get the result of the operation.
 *
 * See agent_manager1_call_register_agent_sync() for the synchronous, blocking version of this method.
 */
void
agent_manager1_call_register_agent (
    AgentManager1 *proxy,
    const gchar *arg_agent,
    const gchar *arg_capability,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RegisterAgent",
    g_variant_new ("(os)",
                   arg_agent,
                   arg_capability),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * agent_manager1_call_register_agent_sync:
 * @proxy: A #AgentManager1Proxy.
 * @arg_agent: Argument to pass with the method invocation.
 * @arg_capability: Argument to pass with the method invocation.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-AgentManager1.RegisterAgent">RegisterAgent()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See agent_manager1_call_register_agent() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
agent_manager1_call_register_agent_sync (
    AgentManager1 *proxy,
    const gchar *arg_agent,
    const gchar *arg_capability,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RegisterAgent",
    g_variant_new ("(os)",
                   arg_agent,
                   arg_capability),
    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;
}

/**
 * agent_manager1_call_unregister_agent:
 * @proxy: A #AgentManager1Proxy.
 * @arg_agent: Argument to pass with the method invocation.
 * @cancellable: (allow-none): 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-bluez-AgentManager1.UnregisterAgent">UnregisterAgent()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call agent_manager1_call_unregister_agent_finish() to get the result of the operation.
 *
 * See agent_manager1_call_unregister_agent_sync() for the synchronous, blocking version of this method.
 */
void
agent_manager1_call_unregister_agent (
    AgentManager1 *proxy,
    const gchar *arg_agent,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "UnregisterAgent",
    g_variant_new ("(o)",
                   arg_agent),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * agent_manager1_call_unregister_agent_sync:
 * @proxy: A #AgentManager1Proxy.
 * @arg_agent: Argument to pass with the method invocation.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-AgentManager1.UnregisterAgent">UnregisterAgent()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See agent_manager1_call_unregister_agent() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
agent_manager1_call_unregister_agent_sync (
    AgentManager1 *proxy,
    const gchar *arg_agent,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "UnregisterAgent",
    g_variant_new ("(o)",
                   arg_agent),
    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;
}

/**
 * agent_manager1_call_request_default_agent:
 * @proxy: A #AgentManager1Proxy.
 * @arg_agent: Argument to pass with the method invocation.
 * @cancellable: (allow-none): 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-bluez-AgentManager1.RequestDefaultAgent">RequestDefaultAgent()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call agent_manager1_call_request_default_agent_finish() to get the result of the operation.
 *
 * See agent_manager1_call_request_default_agent_sync() for the synchronous, blocking version of this method.
 */
void
agent_manager1_call_request_default_agent (
    AgentManager1 *proxy,
    const gchar *arg_agent,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "RequestDefaultAgent",
    g_variant_new ("(o)",
                   arg_agent),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * agent_manager1_call_request_default_agent_sync:
 * @proxy: A #AgentManager1Proxy.
 * @arg_agent: Argument to pass with the method invocation.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-bluez-AgentManager1.RequestDefaultAgent">RequestDefaultAgent()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See agent_manager1_call_request_default_agent() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
agent_manager1_call_request_default_agent_sync (
    AgentManager1 *proxy,
    const gchar *arg_agent,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "RequestDefaultAgent",
    g_variant_new ("(o)",
                   arg_agent),
    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;
}

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

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

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

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

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

/**
 * AgentManager1ProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #AgentManager1Proxy.
 */

struct _AgentManager1ProxyPrivate
{
  GData *qdata;
};

static void agent_manager1_proxy_iface_init (AgentManager1Iface *iface);

G_DEFINE_TYPE_WITH_CODE (AgentManager1Proxy, agent_manager1_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (AgentManager1Proxy)
                         G_IMPLEMENT_INTERFACE (TYPE_AGENT_MANAGER1, agent_manager1_proxy_iface_init));

static void
agent_manager1_proxy_finalize (GObject *object)
{
  AgentManager1Proxy *proxy = AGENT_MANAGER1_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (agent_manager1_proxy_parent_class)->finalize (object);
}

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

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

static void
agent_manager1_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;
  guint num_params;
  guint n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_agent_manager1_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], TYPE_AGENT_MANAGER1);
  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, TYPE_AGENT_MANAGER1);
  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
agent_manager1_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  AgentManager1Proxy *proxy = AGENT_MANAGER1_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 *) &_agent_manager1_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 *) &_agent_manager1_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
agent_manager1_proxy_init (AgentManager1Proxy *proxy)
{
  proxy->priv = agent_manager1_proxy_get_instance_private (proxy);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), agent_manager1_interface_info ());
}

static void
agent_manager1_proxy_class_init (AgentManager1ProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = agent_manager1_proxy_finalize;
  gobject_class->get_property = agent_manager1_proxy_get_property;
  gobject_class->set_property = agent_manager1_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = agent_manager1_proxy_g_signal;
  proxy_class->g_properties_changed = agent_manager1_proxy_g_properties_changed;

}

static void
agent_manager1_proxy_iface_init (AgentManager1Iface *iface)
{
}

/**
 * agent_manager1_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (allow-none): 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-bluez-AgentManager1.top_of_page">org.bluez.AgentManager1</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call agent_manager1_proxy_new_finish() to get the result of the operation.
 *
 * See agent_manager1_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
agent_manager1_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 (TYPE_AGENT_MANAGER1_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.bluez.AgentManager1", NULL);
}

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

/**
 * agent_manager1_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (allow-none): 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-bluez-AgentManager1.top_of_page">org.bluez.AgentManager1</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See agent_manager1_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type AgentManager1Proxy): The constructed proxy object or %NULL if @error is set.
 */
AgentManager1 *
agent_manager1_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (TYPE_AGENT_MANAGER1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.bluez.AgentManager1", NULL);
  if (ret != NULL)
    return AGENT_MANAGER1 (ret);
  else
    return NULL;
}


/**
 * agent_manager1_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: (allow-none): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like agent_manager1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 * You can then call agent_manager1_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See agent_manager1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
agent_manager1_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 (TYPE_AGENT_MANAGER1_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.bluez.AgentManager1", NULL);
}

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

/**
 * agent_manager1_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: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like agent_manager1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See agent_manager1_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type AgentManager1Proxy): The constructed proxy object or %NULL if @error is set.
 */
AgentManager1 *
agent_manager1_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 (TYPE_AGENT_MANAGER1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.bluez.AgentManager1", NULL);
  if (ret != NULL)
    return AGENT_MANAGER1 (ret);
  else
    return NULL;
}


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

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

/**
 * AgentManager1SkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #AgentManager1Skeleton.
 */

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

static void
_agent_manager1_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)
{
  AgentManager1Skeleton *skeleton = AGENT_MANAGER1_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  guint num_params;
  guint num_extra;
  guint 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], TYPE_AGENT_MANAGER1);
  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, TYPE_AGENT_MANAGER1);
  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 *
_agent_manager1_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)
{
  AgentManager1Skeleton *skeleton = AGENT_MANAGER1_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 *) &_agent_manager1_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
_agent_manager1_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)
{
  AgentManager1Skeleton *skeleton = AGENT_MANAGER1_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 *) &_agent_manager1_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 _agent_manager1_skeleton_vtable =
{
  _agent_manager1_skeleton_handle_method_call,
  _agent_manager1_skeleton_handle_get_property,
  _agent_manager1_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
agent_manager1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return agent_manager1_interface_info ();
}

static GDBusInterfaceVTable *
agent_manager1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_agent_manager1_skeleton_vtable;
}

static GVariant *
agent_manager1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  AgentManager1Skeleton *skeleton = AGENT_MANAGER1_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_agent_manager1_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _agent_manager1_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _agent_manager1_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _agent_manager1_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.bluez.AgentManager1", 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
agent_manager1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
}

static void agent_manager1_skeleton_iface_init (AgentManager1Iface *iface);
G_DEFINE_TYPE_WITH_CODE (AgentManager1Skeleton, agent_manager1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (AgentManager1Skeleton)
                         G_IMPLEMENT_INTERFACE (TYPE_AGENT_MANAGER1, agent_manager1_skeleton_iface_init));

static void
agent_manager1_skeleton_finalize (GObject *object)
{
  AgentManager1Skeleton *skeleton = AGENT_MANAGER1_SKELETON (object);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  if (skeleton->priv->changed_properties_idle_source != NULL)
    g_source_destroy (skeleton->priv->changed_properties_idle_source);
  g_main_context_unref (skeleton->priv->context);
  g_mutex_clear (&skeleton->priv->lock);
  G_OBJECT_CLASS (agent_manager1_skeleton_parent_class)->finalize (object);
}

static void
agent_manager1_skeleton_init (AgentManager1Skeleton *skeleton)
{
  skeleton->priv = agent_manager1_skeleton_get_instance_private (skeleton);
  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
agent_manager1_skeleton_class_init (AgentManager1SkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = agent_manager1_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = agent_manager1_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = agent_manager1_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = agent_manager1_skeleton_dbus_interface_get_vtable;
}

static void
agent_manager1_skeleton_iface_init (AgentManager1Iface *iface)
{
}

/**
 * agent_manager1_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-bluez-AgentManager1.top_of_page">org.bluez.AgentManager1</link>.
 *
 * Returns: (transfer full) (type AgentManager1Skeleton): The skeleton object.
 */
AgentManager1 *
agent_manager1_skeleton_new (void)
{
  return AGENT_MANAGER1 (g_object_new (TYPE_AGENT_MANAGER1_SKELETON, NULL));
}

