/*
 * Generated by gdbus-codegen 2.46.2. 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 "../daemon/dbus/gkd-secrets-generated.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.freedesktop.Secret.Service
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.Secret.Service ---- */

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_open_session_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_open_session_IN_ARG_algorithm,
  &_gkd_exported_service_method_info_open_session_IN_ARG_input,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_open_session_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_open_session_OUT_ARG_output,
  &_gkd_exported_service_method_info_open_session_OUT_ARG_result,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_open_session =
{
  {
    -1,
    (gchar *) "OpenSession",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_open_session_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_open_session_OUT_ARG_pointers,
    NULL
  },
  "handle-open-session",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_create_collection_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_create_collection_IN_ARG_properties,
  &_gkd_exported_service_method_info_create_collection_IN_ARG_alias,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_create_collection_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_create_collection_OUT_ARG_collection,
  &_gkd_exported_service_method_info_create_collection_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_create_collection =
{
  {
    -1,
    (gchar *) "CreateCollection",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_create_collection_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_create_collection_OUT_ARG_pointers,
    NULL
  },
  "handle-create-collection",
  FALSE
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_search_items_IN_ARG_attributes =
{
  {
    -1,
    (gchar *) "attributes",
    (gchar *) "a{ss}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_search_items_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_search_items_IN_ARG_attributes,
  NULL
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_search_items_OUT_ARG_unlocked =
{
  {
    -1,
    (gchar *) "unlocked",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_search_items_OUT_ARG_locked =
{
  {
    -1,
    (gchar *) "locked",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_search_items_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_search_items_OUT_ARG_unlocked,
  &_gkd_exported_service_method_info_search_items_OUT_ARG_locked,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_search_items =
{
  {
    -1,
    (gchar *) "SearchItems",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_search_items_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_search_items_OUT_ARG_pointers,
    NULL
  },
  "handle-search-items",
  FALSE
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_unlock_IN_ARG_objects =
{
  {
    -1,
    (gchar *) "objects",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_unlock_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_unlock_IN_ARG_objects,
  NULL
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_unlock_OUT_ARG_unlocked =
{
  {
    -1,
    (gchar *) "unlocked",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_unlock_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_unlock_OUT_ARG_unlocked,
  &_gkd_exported_service_method_info_unlock_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_unlock =
{
  {
    -1,
    (gchar *) "Unlock",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_unlock_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_unlock_OUT_ARG_pointers,
    NULL
  },
  "handle-unlock",
  FALSE
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_lock_IN_ARG_objects =
{
  {
    -1,
    (gchar *) "objects",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_lock_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_lock_IN_ARG_objects,
  NULL
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_lock_OUT_ARG_locked =
{
  {
    -1,
    (gchar *) "locked",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_lock_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_lock_OUT_ARG_locked,
  &_gkd_exported_service_method_info_lock_OUT_ARG_Prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_lock =
{
  {
    -1,
    (gchar *) "Lock",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_lock_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_lock_OUT_ARG_pointers,
    NULL
  },
  "handle-lock",
  FALSE
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_lock_service =
{
  {
    -1,
    (gchar *) "LockService",
    NULL,
    NULL,
    NULL
  },
  "handle-lock-service",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_change_lock_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_change_lock_IN_ARG_collection,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_change_lock_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_change_lock_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_change_lock =
{
  {
    -1,
    (gchar *) "ChangeLock",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_change_lock_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_change_lock_OUT_ARG_pointers,
    NULL
  },
  "handle-change-lock",
  FALSE
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_get_secrets_IN_ARG_items =
{
  {
    -1,
    (gchar *) "items",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_get_secrets_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_get_secrets_IN_ARG_items,
  &_gkd_exported_service_method_info_get_secrets_IN_ARG_session,
  NULL
};

static const _ExtendedGDBusArgInfo _gkd_exported_service_method_info_get_secrets_OUT_ARG_secrets =
{
  {
    -1,
    (gchar *) "secrets",
    (gchar *) "a{o(oayays)}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_get_secrets_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_get_secrets_OUT_ARG_secrets,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_get_secrets =
{
  {
    -1,
    (gchar *) "GetSecrets",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_get_secrets_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_get_secrets_OUT_ARG_pointers,
    NULL
  },
  "handle-get-secrets",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_read_alias_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_read_alias_IN_ARG_name,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_read_alias_OUT_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_read_alias_OUT_ARG_collection,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_read_alias =
{
  {
    -1,
    (gchar *) "ReadAlias",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_read_alias_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_service_method_info_read_alias_OUT_ARG_pointers,
    NULL
  },
  "handle-read-alias",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_method_info_set_alias_IN_ARG_pointers[] =
{
  &_gkd_exported_service_method_info_set_alias_IN_ARG_name,
  &_gkd_exported_service_method_info_set_alias_IN_ARG_collection,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_service_method_info_set_alias =
{
  {
    -1,
    (gchar *) "SetAlias",
    (GDBusArgInfo **) &_gkd_exported_service_method_info_set_alias_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-set-alias",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _gkd_exported_service_method_info_pointers[] =
{
  &_gkd_exported_service_method_info_open_session,
  &_gkd_exported_service_method_info_create_collection,
  &_gkd_exported_service_method_info_search_items,
  &_gkd_exported_service_method_info_unlock,
  &_gkd_exported_service_method_info_lock,
  &_gkd_exported_service_method_info_lock_service,
  &_gkd_exported_service_method_info_change_lock,
  &_gkd_exported_service_method_info_get_secrets,
  &_gkd_exported_service_method_info_read_alias,
  &_gkd_exported_service_method_info_set_alias,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_signal_info_collection_created_ARG_pointers[] =
{
  &_gkd_exported_service_signal_info_collection_created_ARG_collection,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_service_signal_info_collection_created =
{
  {
    -1,
    (gchar *) "CollectionCreated",
    (GDBusArgInfo **) &_gkd_exported_service_signal_info_collection_created_ARG_pointers,
    NULL
  },
  "collection-created"
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_signal_info_collection_deleted_ARG_pointers[] =
{
  &_gkd_exported_service_signal_info_collection_deleted_ARG_collection,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_service_signal_info_collection_deleted =
{
  {
    -1,
    (gchar *) "CollectionDeleted",
    (GDBusArgInfo **) &_gkd_exported_service_signal_info_collection_deleted_ARG_pointers,
    NULL
  },
  "collection-deleted"
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_service_signal_info_collection_changed_ARG_pointers[] =
{
  &_gkd_exported_service_signal_info_collection_changed_ARG_collection,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_service_signal_info_collection_changed =
{
  {
    -1,
    (gchar *) "CollectionChanged",
    (GDBusArgInfo **) &_gkd_exported_service_signal_info_collection_changed_ARG_pointers,
    NULL
  },
  "collection-changed"
};

static const _ExtendedGDBusSignalInfo * const _gkd_exported_service_signal_info_pointers[] =
{
  &_gkd_exported_service_signal_info_collection_created,
  &_gkd_exported_service_signal_info_collection_deleted,
  &_gkd_exported_service_signal_info_collection_changed,
  NULL
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_service_property_info_collections =
{
  {
    -1,
    (gchar *) "Collections",
    (gchar *) "ao",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "collections",
  FALSE
};

static const _ExtendedGDBusPropertyInfo * const _gkd_exported_service_property_info_pointers[] =
{
  &_gkd_exported_service_property_info_collections,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _gkd_exported_service_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Service",
    (GDBusMethodInfo **) &_gkd_exported_service_method_info_pointers,
    (GDBusSignalInfo **) &_gkd_exported_service_signal_info_pointers,
    (GDBusPropertyInfo **) &_gkd_exported_service_property_info_pointers,
    NULL
  },
  "exported-service",
};


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

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



/**
 * GkdExportedService:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Service.top_of_page">org.freedesktop.Secret.Service</link>.
 */

/**
 * GkdExportedServiceIface:
 * @parent_iface: The parent interface.
 * @handle_change_lock: Handler for the #GkdExportedService::handle-change-lock signal.
 * @handle_create_collection: Handler for the #GkdExportedService::handle-create-collection signal.
 * @handle_get_secrets: Handler for the #GkdExportedService::handle-get-secrets signal.
 * @handle_lock: Handler for the #GkdExportedService::handle-lock signal.
 * @handle_lock_service: Handler for the #GkdExportedService::handle-lock-service signal.
 * @handle_open_session: Handler for the #GkdExportedService::handle-open-session signal.
 * @handle_read_alias: Handler for the #GkdExportedService::handle-read-alias signal.
 * @handle_search_items: Handler for the #GkdExportedService::handle-search-items signal.
 * @handle_set_alias: Handler for the #GkdExportedService::handle-set-alias signal.
 * @handle_unlock: Handler for the #GkdExportedService::handle-unlock signal.
 * @get_collections: Getter for the #GkdExportedService:collections property.
 * @collection_changed: Handler for the #GkdExportedService::collection-changed signal.
 * @collection_created: Handler for the #GkdExportedService::collection-created signal.
 * @collection_deleted: Handler for the #GkdExportedService::collection-deleted signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Service.top_of_page">org.freedesktop.Secret.Service</link>.
 */

typedef GkdExportedServiceIface GkdExportedServiceInterface;
G_DEFINE_INTERFACE (GkdExportedService, gkd_exported_service, G_TYPE_OBJECT);

static void
gkd_exported_service_default_init (GkdExportedServiceIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GkdExportedService::handle-open-session:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_algorithm: Argument passed by remote caller.
   * @arg_input: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.OpenSession">OpenSession()</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 gkd_exported_service_complete_open_session() 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-open-session",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_open_session),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);

  /**
   * GkdExportedService::handle-create-collection:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_properties: Argument passed by remote caller.
   * @arg_alias: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.CreateCollection">CreateCollection()</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 gkd_exported_service_complete_create_collection() 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-create-collection",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_create_collection),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING);

  /**
   * GkdExportedService::handle-search-items:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_attributes: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.SearchItems">SearchItems()</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 gkd_exported_service_complete_search_items() 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-search-items",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_search_items),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * GkdExportedService::handle-unlock:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_objects: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.Unlock">Unlock()</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 gkd_exported_service_complete_unlock() 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-unlock",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_unlock),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /**
   * GkdExportedService::handle-lock:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_objects: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.Lock">Lock()</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 gkd_exported_service_complete_lock() 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-lock",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_lock),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /**
   * GkdExportedService::handle-lock-service:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.LockService">LockService()</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 gkd_exported_service_complete_lock_service() 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-lock-service",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_lock_service),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * GkdExportedService::handle-change-lock:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_collection: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.ChangeLock">ChangeLock()</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 gkd_exported_service_complete_change_lock() 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-change-lock",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_change_lock),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * GkdExportedService::handle-get-secrets:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_items: Argument passed by remote caller.
   * @arg_session: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.GetSecrets">GetSecrets()</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 gkd_exported_service_complete_get_secrets() 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-get-secrets",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_get_secrets),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    3,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_STRING);

  /**
   * GkdExportedService::handle-read-alias:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_name: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.ReadAlias">ReadAlias()</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 gkd_exported_service_complete_read_alias() 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-read-alias",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_read_alias),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * GkdExportedService::handle-set-alias:
   * @object: A #GkdExportedService.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_name: Argument passed by remote caller.
   * @arg_collection: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Service.SetAlias">SetAlias()</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 gkd_exported_service_complete_set_alias() 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-set-alias",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, handle_set_alias),
    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);

  /* GObject signals for received D-Bus signals: */
  /**
   * GkdExportedService::collection-created:
   * @object: A #GkdExportedService.
   * @arg_collection: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Service.CollectionCreated">"CollectionCreated"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("collection-created",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, collection_created),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * GkdExportedService::collection-deleted:
   * @object: A #GkdExportedService.
   * @arg_collection: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Service.CollectionDeleted">"CollectionDeleted"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("collection-deleted",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, collection_deleted),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * GkdExportedService::collection-changed:
   * @object: A #GkdExportedService.
   * @arg_collection: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Service.CollectionChanged">"CollectionChanged"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("collection-changed",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedServiceIface, collection_changed),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * GkdExportedService:collections:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Service.Collections">"Collections"</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 ("collections", "Collections", "Collections", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * gkd_exported_service_get_collections: (skip)
 * @object: A #GkdExportedService.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Service.Collections">"Collections"</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 gkd_exported_service_dup_collections() 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 *
gkd_exported_service_get_collections (GkdExportedService *object)
{
  return GKD_EXPORTED_SERVICE_GET_IFACE (object)->get_collections (object);
}

/**
 * gkd_exported_service_dup_collections: (skip)
 * @object: A #GkdExportedService.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Secret-Service.Collections">"Collections"</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 **
gkd_exported_service_dup_collections (GkdExportedService *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "collections", &value, NULL);
  return value;
}

/**
 * gkd_exported_service_set_collections: (skip)
 * @object: A #GkdExportedService.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Service.Collections">"Collections"</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
gkd_exported_service_set_collections (GkdExportedService *object, const gchar *const *value)
{
  g_object_set (G_OBJECT (object), "collections", value, NULL);
}

/**
 * gkd_exported_service_emit_collection_created:
 * @object: A #GkdExportedService.
 * @arg_collection: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Service.CollectionCreated">"CollectionCreated"</link> D-Bus signal.
 */
void
gkd_exported_service_emit_collection_created (
    GkdExportedService *object,
    const gchar *arg_collection)
{
  g_signal_emit_by_name (object, "collection-created", arg_collection);
}

/**
 * gkd_exported_service_emit_collection_deleted:
 * @object: A #GkdExportedService.
 * @arg_collection: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Service.CollectionDeleted">"CollectionDeleted"</link> D-Bus signal.
 */
void
gkd_exported_service_emit_collection_deleted (
    GkdExportedService *object,
    const gchar *arg_collection)
{
  g_signal_emit_by_name (object, "collection-deleted", arg_collection);
}

/**
 * gkd_exported_service_emit_collection_changed:
 * @object: A #GkdExportedService.
 * @arg_collection: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Service.CollectionChanged">"CollectionChanged"</link> D-Bus signal.
 */
void
gkd_exported_service_emit_collection_changed (
    GkdExportedService *object,
    const gchar *arg_collection)
{
  g_signal_emit_by_name (object, "collection-changed", arg_collection);
}

/**
 * gkd_exported_service_call_open_session:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_algorithm: Argument to pass with the method invocation.
 * @arg_input: 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-freedesktop-Secret-Service.OpenSession">OpenSession()</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 gkd_exported_service_call_open_session_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_open_session_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_open_session (
    GkdExportedService *proxy,
    const gchar *arg_algorithm,
    GVariant *arg_input,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "OpenSession",
    g_variant_new ("(s@v)",
                   arg_algorithm,
                   arg_input),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * gkd_exported_service_call_open_session_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_algorithm: Argument to pass with the method invocation.
 * @arg_input: Argument to pass with the method invocation.
 * @out_output: (out): Return location for return parameter or %NULL to ignore.
 * @out_result: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.OpenSession">OpenSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_open_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_open_session_sync (
    GkdExportedService *proxy,
    const gchar *arg_algorithm,
    GVariant *arg_input,
    GVariant **out_output,
    gchar **out_result,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "OpenSession",
    g_variant_new ("(s@v)",
                   arg_algorithm,
                   arg_input),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@vo)",
                 out_output,
                 out_result);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_create_collection:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_properties: Argument to pass with the method invocation.
 * @arg_alias: 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-freedesktop-Secret-Service.CreateCollection">CreateCollection()</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 gkd_exported_service_call_create_collection_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_create_collection_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_create_collection (
    GkdExportedService *proxy,
    GVariant *arg_properties,
    const gchar *arg_alias,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateCollection",
    g_variant_new ("(@a{sv}s)",
                   arg_properties,
                   arg_alias),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_create_collection_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_collection: (out): Return location for return parameter or %NULL to ignore.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_create_collection().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_create_collection().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_create_collection_finish (
    GkdExportedService *proxy,
    gchar **out_collection,
    gchar **out_prompt,
    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,
                 "(oo)",
                 out_collection,
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_create_collection_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_properties: Argument to pass with the method invocation.
 * @arg_alias: Argument to pass with the method invocation.
 * @out_collection: (out): Return location for return parameter or %NULL to ignore.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.CreateCollection">CreateCollection()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_create_collection() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_create_collection_sync (
    GkdExportedService *proxy,
    GVariant *arg_properties,
    const gchar *arg_alias,
    gchar **out_collection,
    gchar **out_prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateCollection",
    g_variant_new ("(@a{sv}s)",
                   arg_properties,
                   arg_alias),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(oo)",
                 out_collection,
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_search_items:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_attributes: 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-freedesktop-Secret-Service.SearchItems">SearchItems()</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 gkd_exported_service_call_search_items_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_search_items_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_search_items (
    GkdExportedService *proxy,
    GVariant *arg_attributes,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SearchItems",
    g_variant_new ("(@a{ss})",
                   arg_attributes),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_search_items_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_unlocked: (out): Return location for return parameter or %NULL to ignore.
 * @out_locked: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_search_items().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_search_items().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_search_items_finish (
    GkdExportedService *proxy,
    gchar ***out_unlocked,
    gchar ***out_locked,
    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,
                 "(^ao^ao)",
                 out_unlocked,
                 out_locked);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_search_items_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_attributes: Argument to pass with the method invocation.
 * @out_unlocked: (out): Return location for return parameter or %NULL to ignore.
 * @out_locked: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.SearchItems">SearchItems()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_search_items() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_search_items_sync (
    GkdExportedService *proxy,
    GVariant *arg_attributes,
    gchar ***out_unlocked,
    gchar ***out_locked,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SearchItems",
    g_variant_new ("(@a{ss})",
                   arg_attributes),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^ao^ao)",
                 out_unlocked,
                 out_locked);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_unlock:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_objects: 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-freedesktop-Secret-Service.Unlock">Unlock()</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 gkd_exported_service_call_unlock_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_unlock_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_unlock (
    GkdExportedService *proxy,
    const gchar *const *arg_objects,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Unlock",
    g_variant_new ("(^ao)",
                   arg_objects),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_unlock_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_unlocked: (out): Return location for return parameter or %NULL to ignore.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_unlock().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_unlock().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_unlock_finish (
    GkdExportedService *proxy,
    gchar ***out_unlocked,
    gchar **out_prompt,
    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,
                 "(^aoo)",
                 out_unlocked,
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_unlock_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_objects: Argument to pass with the method invocation.
 * @out_unlocked: (out): Return location for return parameter or %NULL to ignore.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.Unlock">Unlock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_unlock() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_unlock_sync (
    GkdExportedService *proxy,
    const gchar *const *arg_objects,
    gchar ***out_unlocked,
    gchar **out_prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Unlock",
    g_variant_new ("(^ao)",
                   arg_objects),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^aoo)",
                 out_unlocked,
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_lock:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_objects: 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-freedesktop-Secret-Service.Lock">Lock()</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 gkd_exported_service_call_lock_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_lock_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_lock (
    GkdExportedService *proxy,
    const gchar *const *arg_objects,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Lock",
    g_variant_new ("(^ao)",
                   arg_objects),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_lock_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_locked: (out): Return location for return parameter or %NULL to ignore.
 * @out_Prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_lock().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_lock().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_lock_finish (
    GkdExportedService *proxy,
    gchar ***out_locked,
    gchar **out_Prompt,
    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,
                 "(^aoo)",
                 out_locked,
                 out_Prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_lock_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_objects: Argument to pass with the method invocation.
 * @out_locked: (out): Return location for return parameter or %NULL to ignore.
 * @out_Prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.Lock">Lock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_lock() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_lock_sync (
    GkdExportedService *proxy,
    const gchar *const *arg_objects,
    gchar ***out_locked,
    gchar **out_Prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Lock",
    g_variant_new ("(^ao)",
                   arg_objects),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^aoo)",
                 out_locked,
                 out_Prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_lock_service:
 * @proxy: A #GkdExportedServiceProxy.
 * @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-freedesktop-Secret-Service.LockService">LockService()</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 gkd_exported_service_call_lock_service_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_lock_service_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_lock_service (
    GkdExportedService *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "LockService",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

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

/**
 * gkd_exported_service_call_change_lock:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_collection: 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-freedesktop-Secret-Service.ChangeLock">ChangeLock()</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 gkd_exported_service_call_change_lock_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_change_lock_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_change_lock (
    GkdExportedService *proxy,
    const gchar *arg_collection,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ChangeLock",
    g_variant_new ("(o)",
                   arg_collection),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_change_lock_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_change_lock().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_change_lock().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_change_lock_finish (
    GkdExportedService *proxy,
    gchar **out_prompt,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_change_lock_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_collection: Argument to pass with the method invocation.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.ChangeLock">ChangeLock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_change_lock() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_change_lock_sync (
    GkdExportedService *proxy,
    const gchar *arg_collection,
    gchar **out_prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ChangeLock",
    g_variant_new ("(o)",
                   arg_collection),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_get_secrets:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_items: Argument to pass with the method invocation.
 * @arg_session: 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-freedesktop-Secret-Service.GetSecrets">GetSecrets()</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 gkd_exported_service_call_get_secrets_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_get_secrets_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_get_secrets (
    GkdExportedService *proxy,
    const gchar *const *arg_items,
    const gchar *arg_session,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetSecrets",
    g_variant_new ("(^aoo)",
                   arg_items,
                   arg_session),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_get_secrets_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_secrets: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_get_secrets().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_get_secrets().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_get_secrets_finish (
    GkdExportedService *proxy,
    GVariant **out_secrets,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{o(oayays)})",
                 out_secrets);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_get_secrets_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_items: Argument to pass with the method invocation.
 * @arg_session: Argument to pass with the method invocation.
 * @out_secrets: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.GetSecrets">GetSecrets()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_get_secrets() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_get_secrets_sync (
    GkdExportedService *proxy,
    const gchar *const *arg_items,
    const gchar *arg_session,
    GVariant **out_secrets,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetSecrets",
    g_variant_new ("(^aoo)",
                   arg_items,
                   arg_session),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@a{o(oayays)})",
                 out_secrets);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_read_alias:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_name: 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-freedesktop-Secret-Service.ReadAlias">ReadAlias()</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 gkd_exported_service_call_read_alias_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_read_alias_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_read_alias (
    GkdExportedService *proxy,
    const gchar *arg_name,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "ReadAlias",
    g_variant_new ("(s)",
                   arg_name),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_service_call_read_alias_finish:
 * @proxy: A #GkdExportedServiceProxy.
 * @out_collection: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_service_call_read_alias().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_service_call_read_alias().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_read_alias_finish (
    GkdExportedService *proxy,
    gchar **out_collection,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_collection);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_read_alias_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_name: Argument to pass with the method invocation.
 * @out_collection: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Service.ReadAlias">ReadAlias()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_read_alias() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_read_alias_sync (
    GkdExportedService *proxy,
    const gchar *arg_name,
    gchar **out_collection,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "ReadAlias",
    g_variant_new ("(s)",
                   arg_name),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_collection);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_service_call_set_alias:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_name: Argument to pass with the method invocation.
 * @arg_collection: 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-freedesktop-Secret-Service.SetAlias">SetAlias()</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 gkd_exported_service_call_set_alias_finish() to get the result of the operation.
 *
 * See gkd_exported_service_call_set_alias_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_service_call_set_alias (
    GkdExportedService *proxy,
    const gchar *arg_name,
    const gchar *arg_collection,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetAlias",
    g_variant_new ("(so)",
                   arg_name,
                   arg_collection),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * gkd_exported_service_call_set_alias_sync:
 * @proxy: A #GkdExportedServiceProxy.
 * @arg_name: Argument to pass with the method invocation.
 * @arg_collection: 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-freedesktop-Secret-Service.SetAlias">SetAlias()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_call_set_alias() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_service_call_set_alias_sync (
    GkdExportedService *proxy,
    const gchar *arg_name,
    const gchar *arg_collection,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetAlias",
    g_variant_new ("(so)",
                   arg_name,
                   arg_collection),
    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;
}

/**
 * gkd_exported_service_complete_open_session:
 * @object: A #GkdExportedService.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @output: Parameter to return.
 * @result: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Service.OpenSession">OpenSession()</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
gkd_exported_service_complete_open_session (
    GkdExportedService *object,
    GDBusMethodInvocation *invocation,
    GVariant *output,
    const gchar *result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@vo)",
                   output,
                   result));
}

/**
 * gkd_exported_service_complete_create_collection:
 * @object: A #GkdExportedService.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @collection: Parameter to return.
 * @prompt: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Service.CreateCollection">CreateCollection()</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
gkd_exported_service_complete_create_collection (
    GkdExportedService *object,
    GDBusMethodInvocation *invocation,
    const gchar *collection,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(oo)",
                   collection,
                   prompt));
}

/**
 * gkd_exported_service_complete_search_items:
 * @object: A #GkdExportedService.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @unlocked: Parameter to return.
 * @locked: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Service.SearchItems">SearchItems()</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
gkd_exported_service_complete_search_items (
    GkdExportedService *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *unlocked,
    const gchar *const *locked)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^ao^ao)",
                   unlocked,
                   locked));
}

/**
 * gkd_exported_service_complete_unlock:
 * @object: A #GkdExportedService.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @unlocked: Parameter to return.
 * @prompt: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Service.Unlock">Unlock()</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
gkd_exported_service_complete_unlock (
    GkdExportedService *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *unlocked,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^aoo)",
                   unlocked,
                   prompt));
}

/**
 * gkd_exported_service_complete_lock:
 * @object: A #GkdExportedService.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @locked: Parameter to return.
 * @Prompt: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Service.Lock">Lock()</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
gkd_exported_service_complete_lock (
    GkdExportedService *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *locked,
    const gchar *Prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^aoo)",
                   locked,
                   Prompt));
}

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

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

/**
 * gkd_exported_service_complete_get_secrets:
 * @object: A #GkdExportedService.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @secrets: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Service.GetSecrets">GetSecrets()</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
gkd_exported_service_complete_get_secrets (
    GkdExportedService *object,
    GDBusMethodInvocation *invocation,
    GVariant *secrets)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{o(oayays)})",
                   secrets));
}

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

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

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

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

/**
 * GkdExportedServiceProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedServiceProxy.
 */

struct _GkdExportedServiceProxyPrivate
{
  GData *qdata;
};

static void gkd_exported_service_proxy_iface_init (GkdExportedServiceIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedServiceProxy, gkd_exported_service_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GkdExportedServiceProxy)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SERVICE, gkd_exported_service_proxy_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedServiceProxy, gkd_exported_service_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SERVICE, gkd_exported_service_proxy_iface_init));

#endif
static void
gkd_exported_service_proxy_finalize (GObject *object)
{
  GkdExportedServiceProxy *proxy = GKD_EXPORTED_SERVICE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (gkd_exported_service_proxy_parent_class)->finalize (object);
}

static void
gkd_exported_service_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = _gkd_exported_service_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
gkd_exported_service_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.Secret.Service: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

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

static void
gkd_exported_service_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 *) &_gkd_exported_service_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], GKD_TYPE_EXPORTED_SERVICE);
  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, GKD_TYPE_EXPORTED_SERVICE);
  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
gkd_exported_service_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GkdExportedServiceProxy *proxy = GKD_EXPORTED_SERVICE_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 *) &_gkd_exported_service_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 *) &_gkd_exported_service_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 *const *
gkd_exported_service_proxy_get_collections (GkdExportedService *object)
{
  GkdExportedServiceProxy *proxy = GKD_EXPORTED_SERVICE_PROXY (object);
  GVariant *variant;
  const gchar *const *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Collections");
  if (variant != NULL)
    {
      value = g_variant_get_objv (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static void
gkd_exported_service_proxy_init (GkdExportedServiceProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = gkd_exported_service_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_SERVICE_PROXY, GkdExportedServiceProxyPrivate);
#endif

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

static void
gkd_exported_service_proxy_class_init (GkdExportedServiceProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = gkd_exported_service_proxy_finalize;
  gobject_class->get_property = gkd_exported_service_proxy_get_property;
  gobject_class->set_property = gkd_exported_service_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = gkd_exported_service_proxy_g_signal;
  proxy_class->g_properties_changed = gkd_exported_service_proxy_g_properties_changed;

  gkd_exported_service_override_properties (gobject_class, 1);

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

static void
gkd_exported_service_proxy_iface_init (GkdExportedServiceIface *iface)
{
  iface->get_collections = gkd_exported_service_proxy_get_collections;
}

/**
 * gkd_exported_service_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-freedesktop-Secret-Service.top_of_page">org.freedesktop.Secret.Service</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 gkd_exported_service_proxy_new_finish() to get the result of the operation.
 *
 * See gkd_exported_service_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_service_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 (GKD_TYPE_EXPORTED_SERVICE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Service", NULL);
}

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

/**
 * gkd_exported_service_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-freedesktop-Secret-Service.top_of_page">org.freedesktop.Secret.Service</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedServiceProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedService *
gkd_exported_service_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GKD_TYPE_EXPORTED_SERVICE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Service", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_SERVICE (ret);
  else
    return NULL;
}


/**
 * gkd_exported_service_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 gkd_exported_service_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 gkd_exported_service_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See gkd_exported_service_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_service_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 (GKD_TYPE_EXPORTED_SERVICE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Service", NULL);
}

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

/**
 * gkd_exported_service_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 gkd_exported_service_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_service_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedServiceProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedService *
gkd_exported_service_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 (GKD_TYPE_EXPORTED_SERVICE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Service", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_SERVICE (ret);
  else
    return NULL;
}


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

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

/**
 * GkdExportedServiceSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedServiceSkeleton.
 */

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

static void
_gkd_exported_service_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)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_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], GKD_TYPE_EXPORTED_SERVICE);
  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, GKD_TYPE_EXPORTED_SERVICE);
  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 *
_gkd_exported_service_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)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_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 *) &_gkd_exported_service_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
_gkd_exported_service_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)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_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 *) &_gkd_exported_service_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 _gkd_exported_service_skeleton_vtable =
{
  _gkd_exported_service_skeleton_handle_method_call,
  _gkd_exported_service_skeleton_handle_get_property,
  _gkd_exported_service_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
gkd_exported_service_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return gkd_exported_service_interface_info ();
}

static GDBusInterfaceVTable *
gkd_exported_service_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_gkd_exported_service_skeleton_vtable;
}

static GVariant *
gkd_exported_service_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_gkd_exported_service_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _gkd_exported_service_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _gkd_exported_service_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _gkd_exported_service_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Service", 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 _gkd_exported_service_emit_changed (gpointer user_data);

static void
gkd_exported_service_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_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)
    _gkd_exported_service_emit_changed (skeleton);
}

static void
_gkd_exported_service_on_signal_collection_created (
    GkdExportedService *object,
    const gchar *arg_collection)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
                   arg_collection));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Service", "CollectionCreated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_gkd_exported_service_on_signal_collection_deleted (
    GkdExportedService *object,
    const gchar *arg_collection)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
                   arg_collection));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Service", "CollectionDeleted",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_gkd_exported_service_on_signal_collection_changed (
    GkdExportedService *object,
    const gchar *arg_collection)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
                   arg_collection));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Service", "CollectionChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void gkd_exported_service_skeleton_iface_init (GkdExportedServiceIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedServiceSkeleton, gkd_exported_service_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GkdExportedServiceSkeleton)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SERVICE, gkd_exported_service_skeleton_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedServiceSkeleton, gkd_exported_service_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SERVICE, gkd_exported_service_skeleton_iface_init));

#endif
static void
gkd_exported_service_skeleton_finalize (GObject *object)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (object);
  guint n;
  for (n = 0; n < 1; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  if (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 (gkd_exported_service_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_gkd_exported_service_emit_changed (gpointer user_data)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_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.freedesktop.Secret.Service",
                                           &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
_gkd_exported_service_schedule_emit_changed (GkdExportedServiceSkeleton *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
gkd_exported_service_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_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, _gkd_exported_service_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _gkd_exported_service_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
gkd_exported_service_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
        _gkd_exported_service_schedule_emit_changed (skeleton, _gkd_exported_service_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
gkd_exported_service_skeleton_init (GkdExportedServiceSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = gkd_exported_service_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_SERVICE_SKELETON, GkdExportedServiceSkeletonPrivate);
#endif

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

static const gchar *const *
gkd_exported_service_skeleton_get_collections (GkdExportedService *object)
{
  GkdExportedServiceSkeleton *skeleton = GKD_EXPORTED_SERVICE_SKELETON (object);
  const gchar *const *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boxed (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
gkd_exported_service_skeleton_class_init (GkdExportedServiceSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = gkd_exported_service_skeleton_finalize;
  gobject_class->get_property = gkd_exported_service_skeleton_get_property;
  gobject_class->set_property = gkd_exported_service_skeleton_set_property;
  gobject_class->notify       = gkd_exported_service_skeleton_notify;


  gkd_exported_service_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = gkd_exported_service_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = gkd_exported_service_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = gkd_exported_service_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = gkd_exported_service_skeleton_dbus_interface_get_vtable;

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

static void
gkd_exported_service_skeleton_iface_init (GkdExportedServiceIface *iface)
{
  iface->collection_created = _gkd_exported_service_on_signal_collection_created;
  iface->collection_deleted = _gkd_exported_service_on_signal_collection_deleted;
  iface->collection_changed = _gkd_exported_service_on_signal_collection_changed;
  iface->get_collections = gkd_exported_service_skeleton_get_collections;
}

/**
 * gkd_exported_service_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Service.top_of_page">org.freedesktop.Secret.Service</link>.
 *
 * Returns: (transfer full) (type GkdExportedServiceSkeleton): The skeleton object.
 */
GkdExportedService *
gkd_exported_service_skeleton_new (void)
{
  return GKD_EXPORTED_SERVICE (g_object_new (GKD_TYPE_EXPORTED_SERVICE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.Secret.Collection
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.Secret.Collection ---- */

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_method_info_delete_OUT_ARG_pointers[] =
{
  &_gkd_exported_collection_method_info_delete_OUT_ARG_prompt,
  NULL
};

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

static const _ExtendedGDBusArgInfo _gkd_exported_collection_method_info_search_items_IN_ARG_attributes =
{
  {
    -1,
    (gchar *) "attributes",
    (gchar *) "a{ss}",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_method_info_search_items_IN_ARG_pointers[] =
{
  &_gkd_exported_collection_method_info_search_items_IN_ARG_attributes,
  NULL
};

static const _ExtendedGDBusArgInfo _gkd_exported_collection_method_info_search_items_OUT_ARG_results =
{
  {
    -1,
    (gchar *) "results",
    (gchar *) "ao",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_method_info_search_items_OUT_ARG_pointers[] =
{
  &_gkd_exported_collection_method_info_search_items_OUT_ARG_results,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_collection_method_info_search_items =
{
  {
    -1,
    (gchar *) "SearchItems",
    (GDBusArgInfo **) &_gkd_exported_collection_method_info_search_items_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_collection_method_info_search_items_OUT_ARG_pointers,
    NULL
  },
  "handle-search-items",
  FALSE
};

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

static const _ExtendedGDBusArgInfo _gkd_exported_collection_method_info_create_item_IN_ARG_secret =
{
  {
    -1,
    (gchar *) "secret",
    (gchar *) "(oayays)",
    NULL
  },
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_method_info_create_item_IN_ARG_pointers[] =
{
  &_gkd_exported_collection_method_info_create_item_IN_ARG_properties,
  &_gkd_exported_collection_method_info_create_item_IN_ARG_secret,
  &_gkd_exported_collection_method_info_create_item_IN_ARG_replace,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_method_info_create_item_OUT_ARG_pointers[] =
{
  &_gkd_exported_collection_method_info_create_item_OUT_ARG_item,
  &_gkd_exported_collection_method_info_create_item_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_collection_method_info_create_item =
{
  {
    -1,
    (gchar *) "CreateItem",
    (GDBusArgInfo **) &_gkd_exported_collection_method_info_create_item_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_collection_method_info_create_item_OUT_ARG_pointers,
    NULL
  },
  "handle-create-item",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _gkd_exported_collection_method_info_pointers[] =
{
  &_gkd_exported_collection_method_info_delete,
  &_gkd_exported_collection_method_info_search_items,
  &_gkd_exported_collection_method_info_create_item,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_signal_info_item_created_ARG_pointers[] =
{
  &_gkd_exported_collection_signal_info_item_created_ARG_item,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_collection_signal_info_item_created =
{
  {
    -1,
    (gchar *) "ItemCreated",
    (GDBusArgInfo **) &_gkd_exported_collection_signal_info_item_created_ARG_pointers,
    NULL
  },
  "item-created"
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_signal_info_item_deleted_ARG_pointers[] =
{
  &_gkd_exported_collection_signal_info_item_deleted_ARG_item,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_collection_signal_info_item_deleted =
{
  {
    -1,
    (gchar *) "ItemDeleted",
    (GDBusArgInfo **) &_gkd_exported_collection_signal_info_item_deleted_ARG_pointers,
    NULL
  },
  "item-deleted"
};

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_collection_signal_info_item_changed_ARG_pointers[] =
{
  &_gkd_exported_collection_signal_info_item_changed_ARG_item,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_collection_signal_info_item_changed =
{
  {
    -1,
    (gchar *) "ItemChanged",
    (GDBusArgInfo **) &_gkd_exported_collection_signal_info_item_changed_ARG_pointers,
    NULL
  },
  "item-changed"
};

static const _ExtendedGDBusSignalInfo * const _gkd_exported_collection_signal_info_pointers[] =
{
  &_gkd_exported_collection_signal_info_item_created,
  &_gkd_exported_collection_signal_info_item_deleted,
  &_gkd_exported_collection_signal_info_item_changed,
  NULL
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_collection_property_info_items =
{
  {
    -1,
    (gchar *) "Items",
    (gchar *) "ao",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "items",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_collection_property_info_label =
{
  {
    -1,
    (gchar *) "Label",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "label",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_collection_property_info_locked =
{
  {
    -1,
    (gchar *) "Locked",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "locked",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_collection_property_info_created =
{
  {
    -1,
    (gchar *) "Created",
    (gchar *) "t",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "created",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_collection_property_info_modified =
{
  {
    -1,
    (gchar *) "Modified",
    (gchar *) "t",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "modified",
  FALSE
};

static const _ExtendedGDBusPropertyInfo * const _gkd_exported_collection_property_info_pointers[] =
{
  &_gkd_exported_collection_property_info_items,
  &_gkd_exported_collection_property_info_label,
  &_gkd_exported_collection_property_info_locked,
  &_gkd_exported_collection_property_info_created,
  &_gkd_exported_collection_property_info_modified,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _gkd_exported_collection_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Collection",
    (GDBusMethodInfo **) &_gkd_exported_collection_method_info_pointers,
    (GDBusSignalInfo **) &_gkd_exported_collection_signal_info_pointers,
    (GDBusPropertyInfo **) &_gkd_exported_collection_property_info_pointers,
    NULL
  },
  "exported-collection",
};


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

/**
 * gkd_exported_collection_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 #GkdExportedCollection interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
gkd_exported_collection_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "items");
  g_object_class_override_property (klass, property_id_begin++, "label");
  g_object_class_override_property (klass, property_id_begin++, "locked");
  g_object_class_override_property (klass, property_id_begin++, "created");
  g_object_class_override_property (klass, property_id_begin++, "modified");
  return property_id_begin - 1;
}



/**
 * GkdExportedCollection:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Collection.top_of_page">org.freedesktop.Secret.Collection</link>.
 */

/**
 * GkdExportedCollectionIface:
 * @parent_iface: The parent interface.
 * @handle_create_item: Handler for the #GkdExportedCollection::handle-create-item signal.
 * @handle_delete: Handler for the #GkdExportedCollection::handle-delete signal.
 * @handle_search_items: Handler for the #GkdExportedCollection::handle-search-items signal.
 * @get_created: Getter for the #GkdExportedCollection:created property.
 * @get_items: Getter for the #GkdExportedCollection:items property.
 * @get_label: Getter for the #GkdExportedCollection:label property.
 * @get_locked: Getter for the #GkdExportedCollection:locked property.
 * @get_modified: Getter for the #GkdExportedCollection:modified property.
 * @item_changed: Handler for the #GkdExportedCollection::item-changed signal.
 * @item_created: Handler for the #GkdExportedCollection::item-created signal.
 * @item_deleted: Handler for the #GkdExportedCollection::item-deleted signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Collection.top_of_page">org.freedesktop.Secret.Collection</link>.
 */

typedef GkdExportedCollectionIface GkdExportedCollectionInterface;
G_DEFINE_INTERFACE (GkdExportedCollection, gkd_exported_collection, G_TYPE_OBJECT);

static void
gkd_exported_collection_default_init (GkdExportedCollectionIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GkdExportedCollection::handle-delete:
   * @object: A #GkdExportedCollection.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.Delete">Delete()</link> D-Bus method.
   *
   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gkd_exported_collection_complete_delete() 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-delete",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedCollectionIface, handle_delete),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * GkdExportedCollection::handle-search-items:
   * @object: A #GkdExportedCollection.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_attributes: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.SearchItems">SearchItems()</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 gkd_exported_collection_complete_search_items() 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-search-items",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedCollectionIface, handle_search_items),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /**
   * GkdExportedCollection::handle-create-item:
   * @object: A #GkdExportedCollection.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_properties: Argument passed by remote caller.
   * @arg_secret: Argument passed by remote caller.
   * @arg_replace: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.CreateItem">CreateItem()</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 gkd_exported_collection_complete_create_item() 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-create-item",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedCollectionIface, handle_create_item),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    4,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_BOOLEAN);

  /* GObject signals for received D-Bus signals: */
  /**
   * GkdExportedCollection::item-created:
   * @object: A #GkdExportedCollection.
   * @arg_item: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Collection.ItemCreated">"ItemCreated"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("item-created",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedCollectionIface, item_created),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * GkdExportedCollection::item-deleted:
   * @object: A #GkdExportedCollection.
   * @arg_item: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Collection.ItemDeleted">"ItemDeleted"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("item-deleted",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedCollectionIface, item_deleted),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * GkdExportedCollection::item-changed:
   * @object: A #GkdExportedCollection.
   * @arg_item: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Collection.ItemChanged">"ItemChanged"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("item-changed",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedCollectionIface, item_changed),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * GkdExportedCollection:items:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Items">"Items"</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 ("items", "Items", "Items", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedCollection:label:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Label">"Label"</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 ("label", "Label", "Label", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedCollection:locked:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Locked">"Locked"</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 ("locked", "Locked", "Locked", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedCollection:created:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Created">"Created"</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_uint64 ("created", "Created", "Created", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedCollection:modified:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Modified">"Modified"</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_uint64 ("modified", "Modified", "Modified", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * gkd_exported_collection_get_items: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Items">"Items"</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 gkd_exported_collection_dup_items() 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 *
gkd_exported_collection_get_items (GkdExportedCollection *object)
{
  return GKD_EXPORTED_COLLECTION_GET_IFACE (object)->get_items (object);
}

/**
 * gkd_exported_collection_dup_items: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Items">"Items"</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 **
gkd_exported_collection_dup_items (GkdExportedCollection *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "items", &value, NULL);
  return value;
}

/**
 * gkd_exported_collection_set_items: (skip)
 * @object: A #GkdExportedCollection.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Items">"Items"</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
gkd_exported_collection_set_items (GkdExportedCollection *object, const gchar *const *value)
{
  g_object_set (G_OBJECT (object), "items", value, NULL);
}

/**
 * gkd_exported_collection_get_label: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Label">"Label"</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 gkd_exported_collection_dup_label() 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 *
gkd_exported_collection_get_label (GkdExportedCollection *object)
{
  return GKD_EXPORTED_COLLECTION_GET_IFACE (object)->get_label (object);
}

/**
 * gkd_exported_collection_dup_label: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Label">"Label"</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 *
gkd_exported_collection_dup_label (GkdExportedCollection *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "label", &value, NULL);
  return value;
}

/**
 * gkd_exported_collection_set_label: (skip)
 * @object: A #GkdExportedCollection.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Label">"Label"</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
gkd_exported_collection_set_label (GkdExportedCollection *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "label", value, NULL);
}

/**
 * gkd_exported_collection_get_locked: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Locked">"Locked"</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 
gkd_exported_collection_get_locked (GkdExportedCollection *object)
{
  return GKD_EXPORTED_COLLECTION_GET_IFACE (object)->get_locked (object);
}

/**
 * gkd_exported_collection_set_locked: (skip)
 * @object: A #GkdExportedCollection.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Locked">"Locked"</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
gkd_exported_collection_set_locked (GkdExportedCollection *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "locked", value, NULL);
}

/**
 * gkd_exported_collection_get_created: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Created">"Created"</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.
 */
guint64 
gkd_exported_collection_get_created (GkdExportedCollection *object)
{
  return GKD_EXPORTED_COLLECTION_GET_IFACE (object)->get_created (object);
}

/**
 * gkd_exported_collection_set_created: (skip)
 * @object: A #GkdExportedCollection.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Created">"Created"</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
gkd_exported_collection_set_created (GkdExportedCollection *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "created", value, NULL);
}

/**
 * gkd_exported_collection_get_modified: (skip)
 * @object: A #GkdExportedCollection.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Modified">"Modified"</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.
 */
guint64 
gkd_exported_collection_get_modified (GkdExportedCollection *object)
{
  return GKD_EXPORTED_COLLECTION_GET_IFACE (object)->get_modified (object);
}

/**
 * gkd_exported_collection_set_modified: (skip)
 * @object: A #GkdExportedCollection.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Collection.Modified">"Modified"</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
gkd_exported_collection_set_modified (GkdExportedCollection *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "modified", value, NULL);
}

/**
 * gkd_exported_collection_emit_item_created:
 * @object: A #GkdExportedCollection.
 * @arg_item: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Collection.ItemCreated">"ItemCreated"</link> D-Bus signal.
 */
void
gkd_exported_collection_emit_item_created (
    GkdExportedCollection *object,
    const gchar *arg_item)
{
  g_signal_emit_by_name (object, "item-created", arg_item);
}

/**
 * gkd_exported_collection_emit_item_deleted:
 * @object: A #GkdExportedCollection.
 * @arg_item: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Collection.ItemDeleted">"ItemDeleted"</link> D-Bus signal.
 */
void
gkd_exported_collection_emit_item_deleted (
    GkdExportedCollection *object,
    const gchar *arg_item)
{
  g_signal_emit_by_name (object, "item-deleted", arg_item);
}

/**
 * gkd_exported_collection_emit_item_changed:
 * @object: A #GkdExportedCollection.
 * @arg_item: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Collection.ItemChanged">"ItemChanged"</link> D-Bus signal.
 */
void
gkd_exported_collection_emit_item_changed (
    GkdExportedCollection *object,
    const gchar *arg_item)
{
  g_signal_emit_by_name (object, "item-changed", arg_item);
}

/**
 * gkd_exported_collection_call_delete:
 * @proxy: A #GkdExportedCollectionProxy.
 * @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-freedesktop-Secret-Collection.Delete">Delete()</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 gkd_exported_collection_call_delete_finish() to get the result of the operation.
 *
 * See gkd_exported_collection_call_delete_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_collection_call_delete (
    GkdExportedCollection *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Delete",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_collection_call_delete_finish:
 * @proxy: A #GkdExportedCollectionProxy.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_collection_call_delete().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_collection_call_delete().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_collection_call_delete_finish (
    GkdExportedCollection *proxy,
    gchar **out_prompt,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_collection_call_delete_sync:
 * @proxy: A #GkdExportedCollectionProxy.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.Delete">Delete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_collection_call_delete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_collection_call_delete_sync (
    GkdExportedCollection *proxy,
    gchar **out_prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Delete",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_collection_call_search_items:
 * @proxy: A #GkdExportedCollectionProxy.
 * @arg_attributes: 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-freedesktop-Secret-Collection.SearchItems">SearchItems()</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 gkd_exported_collection_call_search_items_finish() to get the result of the operation.
 *
 * See gkd_exported_collection_call_search_items_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_collection_call_search_items (
    GkdExportedCollection *proxy,
    GVariant *arg_attributes,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SearchItems",
    g_variant_new ("(@a{ss})",
                   arg_attributes),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_collection_call_search_items_finish:
 * @proxy: A #GkdExportedCollectionProxy.
 * @out_results: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_collection_call_search_items().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_collection_call_search_items().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_collection_call_search_items_finish (
    GkdExportedCollection *proxy,
    gchar ***out_results,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^ao)",
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_collection_call_search_items_sync:
 * @proxy: A #GkdExportedCollectionProxy.
 * @arg_attributes: Argument to pass with the method invocation.
 * @out_results: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.SearchItems">SearchItems()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_collection_call_search_items() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_collection_call_search_items_sync (
    GkdExportedCollection *proxy,
    GVariant *arg_attributes,
    gchar ***out_results,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SearchItems",
    g_variant_new ("(@a{ss})",
                   arg_attributes),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(^ao)",
                 out_results);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_collection_call_create_item:
 * @proxy: A #GkdExportedCollectionProxy.
 * @arg_properties: Argument to pass with the method invocation.
 * @arg_secret: Argument to pass with the method invocation.
 * @arg_replace: 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-freedesktop-Secret-Collection.CreateItem">CreateItem()</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 gkd_exported_collection_call_create_item_finish() to get the result of the operation.
 *
 * See gkd_exported_collection_call_create_item_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_collection_call_create_item (
    GkdExportedCollection *proxy,
    GVariant *arg_properties,
    GVariant *arg_secret,
    gboolean arg_replace,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "CreateItem",
    g_variant_new ("(@a{sv}@(oayays)b)",
                   arg_properties,
                   arg_secret,
                   arg_replace),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_collection_call_create_item_finish:
 * @proxy: A #GkdExportedCollectionProxy.
 * @out_item: (out): Return location for return parameter or %NULL to ignore.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_collection_call_create_item().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_collection_call_create_item().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_collection_call_create_item_finish (
    GkdExportedCollection *proxy,
    gchar **out_item,
    gchar **out_prompt,
    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,
                 "(oo)",
                 out_item,
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_collection_call_create_item_sync:
 * @proxy: A #GkdExportedCollectionProxy.
 * @arg_properties: Argument to pass with the method invocation.
 * @arg_secret: Argument to pass with the method invocation.
 * @arg_replace: Argument to pass with the method invocation.
 * @out_item: (out): Return location for return parameter or %NULL to ignore.
 * @out_prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.CreateItem">CreateItem()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_collection_call_create_item() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_collection_call_create_item_sync (
    GkdExportedCollection *proxy,
    GVariant *arg_properties,
    GVariant *arg_secret,
    gboolean arg_replace,
    gchar **out_item,
    gchar **out_prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "CreateItem",
    g_variant_new ("(@a{sv}@(oayays)b)",
                   arg_properties,
                   arg_secret,
                   arg_replace),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(oo)",
                 out_item,
                 out_prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_collection_complete_delete:
 * @object: A #GkdExportedCollection.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @prompt: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.Delete">Delete()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void
gkd_exported_collection_complete_delete (
    GkdExportedCollection *object,
    GDBusMethodInvocation *invocation,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   prompt));
}

/**
 * gkd_exported_collection_complete_search_items:
 * @object: A #GkdExportedCollection.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @results: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.SearchItems">SearchItems()</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
gkd_exported_collection_complete_search_items (
    GkdExportedCollection *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^ao)",
                   results));
}

/**
 * gkd_exported_collection_complete_create_item:
 * @object: A #GkdExportedCollection.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @item: Parameter to return.
 * @prompt: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Collection.CreateItem">CreateItem()</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
gkd_exported_collection_complete_create_item (
    GkdExportedCollection *object,
    GDBusMethodInvocation *invocation,
    const gchar *item,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(oo)",
                   item,
                   prompt));
}

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

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

/**
 * GkdExportedCollectionProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedCollectionProxy.
 */

struct _GkdExportedCollectionProxyPrivate
{
  GData *qdata;
};

static void gkd_exported_collection_proxy_iface_init (GkdExportedCollectionIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedCollectionProxy, gkd_exported_collection_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GkdExportedCollectionProxy)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_COLLECTION, gkd_exported_collection_proxy_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedCollectionProxy, gkd_exported_collection_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_COLLECTION, gkd_exported_collection_proxy_iface_init));

#endif
static void
gkd_exported_collection_proxy_finalize (GObject *object)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (gkd_exported_collection_proxy_parent_class)->finalize (object);
}

static void
gkd_exported_collection_proxy_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec G_GNUC_UNUSED)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 5);
  info = _gkd_exported_collection_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
gkd_exported_collection_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.Secret.Collection: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

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

static void
gkd_exported_collection_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 *) &_gkd_exported_collection_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], GKD_TYPE_EXPORTED_COLLECTION);
  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, GKD_TYPE_EXPORTED_COLLECTION);
  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
gkd_exported_collection_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_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 *) &_gkd_exported_collection_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 *) &_gkd_exported_collection_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 *const *
gkd_exported_collection_proxy_get_items (GkdExportedCollection *object)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_PROXY (object);
  GVariant *variant;
  const gchar *const *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Items");
  if (variant != NULL)
    {
      value = g_variant_get_objv (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
gkd_exported_collection_proxy_get_label (GkdExportedCollection *object)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Label");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static gboolean 
gkd_exported_collection_proxy_get_locked (GkdExportedCollection *object)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Locked");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint64 
gkd_exported_collection_proxy_get_created (GkdExportedCollection *object)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_PROXY (object);
  GVariant *variant;
  guint64 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Created");
  if (variant != NULL)
    {
      value = g_variant_get_uint64 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint64 
gkd_exported_collection_proxy_get_modified (GkdExportedCollection *object)
{
  GkdExportedCollectionProxy *proxy = GKD_EXPORTED_COLLECTION_PROXY (object);
  GVariant *variant;
  guint64 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Modified");
  if (variant != NULL)
    {
      value = g_variant_get_uint64 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
gkd_exported_collection_proxy_init (GkdExportedCollectionProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = gkd_exported_collection_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_COLLECTION_PROXY, GkdExportedCollectionProxyPrivate);
#endif

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

static void
gkd_exported_collection_proxy_class_init (GkdExportedCollectionProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = gkd_exported_collection_proxy_finalize;
  gobject_class->get_property = gkd_exported_collection_proxy_get_property;
  gobject_class->set_property = gkd_exported_collection_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = gkd_exported_collection_proxy_g_signal;
  proxy_class->g_properties_changed = gkd_exported_collection_proxy_g_properties_changed;

  gkd_exported_collection_override_properties (gobject_class, 1);

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

static void
gkd_exported_collection_proxy_iface_init (GkdExportedCollectionIface *iface)
{
  iface->get_items = gkd_exported_collection_proxy_get_items;
  iface->get_label = gkd_exported_collection_proxy_get_label;
  iface->get_locked = gkd_exported_collection_proxy_get_locked;
  iface->get_created = gkd_exported_collection_proxy_get_created;
  iface->get_modified = gkd_exported_collection_proxy_get_modified;
}

/**
 * gkd_exported_collection_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-freedesktop-Secret-Collection.top_of_page">org.freedesktop.Secret.Collection</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 gkd_exported_collection_proxy_new_finish() to get the result of the operation.
 *
 * See gkd_exported_collection_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_collection_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 (GKD_TYPE_EXPORTED_COLLECTION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Collection", NULL);
}

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

/**
 * gkd_exported_collection_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-freedesktop-Secret-Collection.top_of_page">org.freedesktop.Secret.Collection</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_collection_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedCollectionProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedCollection *
gkd_exported_collection_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GKD_TYPE_EXPORTED_COLLECTION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Collection", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_COLLECTION (ret);
  else
    return NULL;
}


/**
 * gkd_exported_collection_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 gkd_exported_collection_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 gkd_exported_collection_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See gkd_exported_collection_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_collection_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 (GKD_TYPE_EXPORTED_COLLECTION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Collection", NULL);
}

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

/**
 * gkd_exported_collection_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 gkd_exported_collection_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_collection_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedCollectionProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedCollection *
gkd_exported_collection_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 (GKD_TYPE_EXPORTED_COLLECTION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Collection", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_COLLECTION (ret);
  else
    return NULL;
}


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

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

/**
 * GkdExportedCollectionSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedCollectionSkeleton.
 */

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

static void
_gkd_exported_collection_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)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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], GKD_TYPE_EXPORTED_COLLECTION);
  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, GKD_TYPE_EXPORTED_COLLECTION);
  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 *
_gkd_exported_collection_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)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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 *) &_gkd_exported_collection_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
_gkd_exported_collection_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)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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 *) &_gkd_exported_collection_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 _gkd_exported_collection_skeleton_vtable =
{
  _gkd_exported_collection_skeleton_handle_method_call,
  _gkd_exported_collection_skeleton_handle_get_property,
  _gkd_exported_collection_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
gkd_exported_collection_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return gkd_exported_collection_interface_info ();
}

static GDBusInterfaceVTable *
gkd_exported_collection_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_gkd_exported_collection_skeleton_vtable;
}

static GVariant *
gkd_exported_collection_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_gkd_exported_collection_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _gkd_exported_collection_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _gkd_exported_collection_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _gkd_exported_collection_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Collection", 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 _gkd_exported_collection_emit_changed (gpointer user_data);

static void
gkd_exported_collection_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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)
    _gkd_exported_collection_emit_changed (skeleton);
}

static void
_gkd_exported_collection_on_signal_item_created (
    GkdExportedCollection *object,
    const gchar *arg_item)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
                   arg_item));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Collection", "ItemCreated",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_gkd_exported_collection_on_signal_item_deleted (
    GkdExportedCollection *object,
    const gchar *arg_item)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
                   arg_item));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Collection", "ItemDeleted",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_gkd_exported_collection_on_signal_item_changed (
    GkdExportedCollection *object,
    const gchar *arg_item)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
                   arg_item));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Collection", "ItemChanged",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void gkd_exported_collection_skeleton_iface_init (GkdExportedCollectionIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedCollectionSkeleton, gkd_exported_collection_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GkdExportedCollectionSkeleton)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_COLLECTION, gkd_exported_collection_skeleton_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedCollectionSkeleton, gkd_exported_collection_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_COLLECTION, gkd_exported_collection_skeleton_iface_init));

#endif
static void
gkd_exported_collection_skeleton_finalize (GObject *object)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);
  guint n;
  for (n = 0; n < 5; n++)
    g_value_unset (&skeleton->priv->properties[n]);
  g_free (skeleton->priv->properties);
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  if (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 (gkd_exported_collection_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_gkd_exported_collection_emit_changed (gpointer user_data)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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.freedesktop.Secret.Collection",
                                           &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
_gkd_exported_collection_schedule_emit_changed (GkdExportedCollectionSkeleton *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
gkd_exported_collection_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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, _gkd_exported_collection_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _gkd_exported_collection_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
gkd_exported_collection_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 5);
  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)
        _gkd_exported_collection_schedule_emit_changed (skeleton, _gkd_exported_collection_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
gkd_exported_collection_skeleton_init (GkdExportedCollectionSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = gkd_exported_collection_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_COLLECTION_SKELETON, GkdExportedCollectionSkeletonPrivate);
#endif

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

static const gchar *const *
gkd_exported_collection_skeleton_get_items (GkdExportedCollection *object)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);
  const gchar *const *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boxed (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
gkd_exported_collection_skeleton_get_label (GkdExportedCollection *object)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_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 gboolean 
gkd_exported_collection_skeleton_get_locked (GkdExportedCollection *object)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[2]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint64 
gkd_exported_collection_skeleton_get_created (GkdExportedCollection *object)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);
  guint64 value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint64 (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint64 
gkd_exported_collection_skeleton_get_modified (GkdExportedCollection *object)
{
  GkdExportedCollectionSkeleton *skeleton = GKD_EXPORTED_COLLECTION_SKELETON (object);
  guint64 value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint64 (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
gkd_exported_collection_skeleton_class_init (GkdExportedCollectionSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = gkd_exported_collection_skeleton_finalize;
  gobject_class->get_property = gkd_exported_collection_skeleton_get_property;
  gobject_class->set_property = gkd_exported_collection_skeleton_set_property;
  gobject_class->notify       = gkd_exported_collection_skeleton_notify;


  gkd_exported_collection_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = gkd_exported_collection_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = gkd_exported_collection_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = gkd_exported_collection_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = gkd_exported_collection_skeleton_dbus_interface_get_vtable;

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

static void
gkd_exported_collection_skeleton_iface_init (GkdExportedCollectionIface *iface)
{
  iface->item_created = _gkd_exported_collection_on_signal_item_created;
  iface->item_deleted = _gkd_exported_collection_on_signal_item_deleted;
  iface->item_changed = _gkd_exported_collection_on_signal_item_changed;
  iface->get_items = gkd_exported_collection_skeleton_get_items;
  iface->get_label = gkd_exported_collection_skeleton_get_label;
  iface->get_locked = gkd_exported_collection_skeleton_get_locked;
  iface->get_created = gkd_exported_collection_skeleton_get_created;
  iface->get_modified = gkd_exported_collection_skeleton_get_modified;
}

/**
 * gkd_exported_collection_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Collection.top_of_page">org.freedesktop.Secret.Collection</link>.
 *
 * Returns: (transfer full) (type GkdExportedCollectionSkeleton): The skeleton object.
 */
GkdExportedCollection *
gkd_exported_collection_skeleton_new (void)
{
  return GKD_EXPORTED_COLLECTION (g_object_new (GKD_TYPE_EXPORTED_COLLECTION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.Secret.Item
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.Secret.Item ---- */

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_item_method_info_delete_OUT_ARG_pointers[] =
{
  &_gkd_exported_item_method_info_delete_OUT_ARG_Prompt,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_item_method_info_get_secret_IN_ARG_pointers[] =
{
  &_gkd_exported_item_method_info_get_secret_IN_ARG_session,
  NULL
};

static const _ExtendedGDBusArgInfo _gkd_exported_item_method_info_get_secret_OUT_ARG_secret =
{
  {
    -1,
    (gchar *) "secret",
    (gchar *) "(oayays)",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_item_method_info_get_secret_OUT_ARG_pointers[] =
{
  &_gkd_exported_item_method_info_get_secret_OUT_ARG_secret,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_item_method_info_get_secret =
{
  {
    -1,
    (gchar *) "GetSecret",
    (GDBusArgInfo **) &_gkd_exported_item_method_info_get_secret_IN_ARG_pointers,
    (GDBusArgInfo **) &_gkd_exported_item_method_info_get_secret_OUT_ARG_pointers,
    NULL
  },
  "handle-get-secret",
  FALSE
};

static const _ExtendedGDBusArgInfo _gkd_exported_item_method_info_set_secret_IN_ARG_secret =
{
  {
    -1,
    (gchar *) "secret",
    (gchar *) "(oayays)",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const _gkd_exported_item_method_info_set_secret_IN_ARG_pointers[] =
{
  &_gkd_exported_item_method_info_set_secret_IN_ARG_secret,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_item_method_info_set_secret =
{
  {
    -1,
    (gchar *) "SetSecret",
    (GDBusArgInfo **) &_gkd_exported_item_method_info_set_secret_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-set-secret",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _gkd_exported_item_method_info_pointers[] =
{
  &_gkd_exported_item_method_info_delete,
  &_gkd_exported_item_method_info_get_secret,
  &_gkd_exported_item_method_info_set_secret,
  NULL
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_item_property_info_locked =
{
  {
    -1,
    (gchar *) "Locked",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "locked",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_item_property_info_attributes =
{
  {
    -1,
    (gchar *) "Attributes",
    (gchar *) "a{ss}",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "attributes",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_item_property_info_label =
{
  {
    -1,
    (gchar *) "Label",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "label",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_item_property_info_type_ =
{
  {
    -1,
    (gchar *) "Type",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "type",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_item_property_info_created =
{
  {
    -1,
    (gchar *) "Created",
    (gchar *) "t",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "created",
  FALSE
};

static const _ExtendedGDBusPropertyInfo _gkd_exported_item_property_info_modified =
{
  {
    -1,
    (gchar *) "Modified",
    (gchar *) "t",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "modified",
  FALSE
};

static const _ExtendedGDBusPropertyInfo * const _gkd_exported_item_property_info_pointers[] =
{
  &_gkd_exported_item_property_info_locked,
  &_gkd_exported_item_property_info_attributes,
  &_gkd_exported_item_property_info_label,
  &_gkd_exported_item_property_info_type_,
  &_gkd_exported_item_property_info_created,
  &_gkd_exported_item_property_info_modified,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _gkd_exported_item_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Item",
    (GDBusMethodInfo **) &_gkd_exported_item_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &_gkd_exported_item_property_info_pointers,
    NULL
  },
  "exported-item",
};


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

/**
 * gkd_exported_item_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 #GkdExportedItem interface for a concrete class.
 * The properties are overridden in the order they are defined.
 *
 * Returns: The last property id.
 */
guint
gkd_exported_item_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "locked");
  g_object_class_override_property (klass, property_id_begin++, "attributes");
  g_object_class_override_property (klass, property_id_begin++, "label");
  g_object_class_override_property (klass, property_id_begin++, "type");
  g_object_class_override_property (klass, property_id_begin++, "created");
  g_object_class_override_property (klass, property_id_begin++, "modified");
  return property_id_begin - 1;
}



/**
 * GkdExportedItem:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Item.top_of_page">org.freedesktop.Secret.Item</link>.
 */

/**
 * GkdExportedItemIface:
 * @parent_iface: The parent interface.
 * @handle_delete: Handler for the #GkdExportedItem::handle-delete signal.
 * @handle_get_secret: Handler for the #GkdExportedItem::handle-get-secret signal.
 * @handle_set_secret: Handler for the #GkdExportedItem::handle-set-secret signal.
 * @get_attributes: Getter for the #GkdExportedItem:attributes property.
 * @get_created: Getter for the #GkdExportedItem:created property.
 * @get_label: Getter for the #GkdExportedItem:label property.
 * @get_locked: Getter for the #GkdExportedItem:locked property.
 * @get_modified: Getter for the #GkdExportedItem:modified property.
 * @get_type_: Getter for the #GkdExportedItem:type property.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Item.top_of_page">org.freedesktop.Secret.Item</link>.
 */

typedef GkdExportedItemIface GkdExportedItemInterface;
G_DEFINE_INTERFACE (GkdExportedItem, gkd_exported_item, G_TYPE_OBJECT);

static void
gkd_exported_item_default_init (GkdExportedItemIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GkdExportedItem::handle-delete:
   * @object: A #GkdExportedItem.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Item.Delete">Delete()</link> D-Bus method.
   *
   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gkd_exported_item_complete_delete() 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-delete",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedItemIface, handle_delete),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * GkdExportedItem::handle-get-secret:
   * @object: A #GkdExportedItem.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_session: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Item.GetSecret">GetSecret()</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 gkd_exported_item_complete_get_secret() 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-get-secret",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedItemIface, handle_get_secret),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * GkdExportedItem::handle-set-secret:
   * @object: A #GkdExportedItem.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_secret: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Item.SetSecret">SetSecret()</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 gkd_exported_item_complete_set_secret() 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-set-secret",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedItemIface, handle_set_secret),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);

  /* GObject properties for D-Bus properties: */
  /**
   * GkdExportedItem:locked:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Item.Locked">"Locked"</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 ("locked", "Locked", "Locked", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedItem:attributes:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Item.Attributes">"Attributes"</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_variant ("attributes", "Attributes", "Attributes", G_VARIANT_TYPE ("a{ss}"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedItem:label:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Item.Label">"Label"</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 ("label", "Label", "Label", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedItem:type:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Item.Type">"Type"</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 ("type", "Type", "Type", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedItem:created:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Item.Created">"Created"</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_uint64 ("created", "Created", "Created", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * GkdExportedItem:modified:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Secret-Item.Modified">"Modified"</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_uint64 ("modified", "Modified", "Modified", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * gkd_exported_item_get_locked: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Locked">"Locked"</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 
gkd_exported_item_get_locked (GkdExportedItem *object)
{
  return GKD_EXPORTED_ITEM_GET_IFACE (object)->get_locked (object);
}

/**
 * gkd_exported_item_set_locked: (skip)
 * @object: A #GkdExportedItem.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Locked">"Locked"</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
gkd_exported_item_set_locked (GkdExportedItem *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "locked", value, NULL);
}

/**
 * gkd_exported_item_get_attributes: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Attributes">"Attributes"</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 gkd_exported_item_dup_attributes() 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.
 */
GVariant *
gkd_exported_item_get_attributes (GkdExportedItem *object)
{
  return GKD_EXPORTED_ITEM_GET_IFACE (object)->get_attributes (object);
}

/**
 * gkd_exported_item_dup_attributes: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Attributes">"Attributes"</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_variant_unref().
 */
GVariant *
gkd_exported_item_dup_attributes (GkdExportedItem *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "attributes", &value, NULL);
  return value;
}

/**
 * gkd_exported_item_set_attributes: (skip)
 * @object: A #GkdExportedItem.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Attributes">"Attributes"</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
gkd_exported_item_set_attributes (GkdExportedItem *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "attributes", value, NULL);
}

/**
 * gkd_exported_item_get_label: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Label">"Label"</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 gkd_exported_item_dup_label() 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 *
gkd_exported_item_get_label (GkdExportedItem *object)
{
  return GKD_EXPORTED_ITEM_GET_IFACE (object)->get_label (object);
}

/**
 * gkd_exported_item_dup_label: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Label">"Label"</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 *
gkd_exported_item_dup_label (GkdExportedItem *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "label", &value, NULL);
  return value;
}

/**
 * gkd_exported_item_set_label: (skip)
 * @object: A #GkdExportedItem.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Label">"Label"</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
gkd_exported_item_set_label (GkdExportedItem *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "label", value, NULL);
}

/**
 * gkd_exported_item_get_type_: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Type">"Type"</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 gkd_exported_item_dup_type_() 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 *
gkd_exported_item_get_type_ (GkdExportedItem *object)
{
  return GKD_EXPORTED_ITEM_GET_IFACE (object)->get_type_ (object);
}

/**
 * gkd_exported_item_dup_type_: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Type">"Type"</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 *
gkd_exported_item_dup_type_ (GkdExportedItem *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "type", &value, NULL);
  return value;
}

/**
 * gkd_exported_item_set_type_: (skip)
 * @object: A #GkdExportedItem.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Type">"Type"</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
gkd_exported_item_set_type_ (GkdExportedItem *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "type", value, NULL);
}

/**
 * gkd_exported_item_get_created: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Created">"Created"</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.
 */
guint64 
gkd_exported_item_get_created (GkdExportedItem *object)
{
  return GKD_EXPORTED_ITEM_GET_IFACE (object)->get_created (object);
}

/**
 * gkd_exported_item_set_created: (skip)
 * @object: A #GkdExportedItem.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Created">"Created"</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
gkd_exported_item_set_created (GkdExportedItem *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "created", value, NULL);
}

/**
 * gkd_exported_item_get_modified: (skip)
 * @object: A #GkdExportedItem.
 *
 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Modified">"Modified"</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.
 */
guint64 
gkd_exported_item_get_modified (GkdExportedItem *object)
{
  return GKD_EXPORTED_ITEM_GET_IFACE (object)->get_modified (object);
}

/**
 * gkd_exported_item_set_modified: (skip)
 * @object: A #GkdExportedItem.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-freedesktop-Secret-Item.Modified">"Modified"</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
gkd_exported_item_set_modified (GkdExportedItem *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "modified", value, NULL);
}

/**
 * gkd_exported_item_call_delete:
 * @proxy: A #GkdExportedItemProxy.
 * @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-freedesktop-Secret-Item.Delete">Delete()</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 gkd_exported_item_call_delete_finish() to get the result of the operation.
 *
 * See gkd_exported_item_call_delete_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_item_call_delete (
    GkdExportedItem *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Delete",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_item_call_delete_finish:
 * @proxy: A #GkdExportedItemProxy.
 * @out_Prompt: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_item_call_delete().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_item_call_delete().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_item_call_delete_finish (
    GkdExportedItem *proxy,
    gchar **out_Prompt,
    GAsyncResult *res,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_Prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_item_call_delete_sync:
 * @proxy: A #GkdExportedItemProxy.
 * @out_Prompt: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Item.Delete">Delete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_item_call_delete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_item_call_delete_sync (
    GkdExportedItem *proxy,
    gchar **out_Prompt,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Delete",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(o)",
                 out_Prompt);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_item_call_get_secret:
 * @proxy: A #GkdExportedItemProxy.
 * @arg_session: 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-freedesktop-Secret-Item.GetSecret">GetSecret()</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 gkd_exported_item_call_get_secret_finish() to get the result of the operation.
 *
 * See gkd_exported_item_call_get_secret_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_item_call_get_secret (
    GkdExportedItem *proxy,
    const gchar *arg_session,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetSecret",
    g_variant_new ("(o)",
                   arg_session),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * gkd_exported_item_call_get_secret_finish:
 * @proxy: A #GkdExportedItemProxy.
 * @out_secret: (out): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gkd_exported_item_call_get_secret().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with gkd_exported_item_call_get_secret().
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_item_call_get_secret_finish (
    GkdExportedItem *proxy,
    GVariant **out_secret,
    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,
                 "(@(oayays))",
                 out_secret);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_item_call_get_secret_sync:
 * @proxy: A #GkdExportedItemProxy.
 * @arg_session: Argument to pass with the method invocation.
 * @out_secret: (out): Return location for return parameter or %NULL to ignore.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Item.GetSecret">GetSecret()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_item_call_get_secret() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_item_call_get_secret_sync (
    GkdExportedItem *proxy,
    const gchar *arg_session,
    GVariant **out_secret,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetSecret",
    g_variant_new ("(o)",
                   arg_session),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(@(oayays))",
                 out_secret);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_item_call_set_secret:
 * @proxy: A #GkdExportedItemProxy.
 * @arg_secret: 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-freedesktop-Secret-Item.SetSecret">SetSecret()</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 gkd_exported_item_call_set_secret_finish() to get the result of the operation.
 *
 * See gkd_exported_item_call_set_secret_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_item_call_set_secret (
    GkdExportedItem *proxy,
    GVariant *arg_secret,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "SetSecret",
    g_variant_new ("(@(oayays))",
                   arg_secret),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * gkd_exported_item_call_set_secret_sync:
 * @proxy: A #GkdExportedItemProxy.
 * @arg_secret: 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-freedesktop-Secret-Item.SetSecret">SetSecret()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_item_call_set_secret() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_item_call_set_secret_sync (
    GkdExportedItem *proxy,
    GVariant *arg_secret,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "SetSecret",
    g_variant_new ("(@(oayays))",
                   arg_secret),
    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;
}

/**
 * gkd_exported_item_complete_delete:
 * @object: A #GkdExportedItem.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @Prompt: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Item.Delete">Delete()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void
gkd_exported_item_complete_delete (
    GkdExportedItem *object,
    GDBusMethodInvocation *invocation,
    const gchar *Prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   Prompt));
}

/**
 * gkd_exported_item_complete_get_secret:
 * @object: A #GkdExportedItem.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @secret: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Item.GetSecret">GetSecret()</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
gkd_exported_item_complete_get_secret (
    GkdExportedItem *object,
    GDBusMethodInvocation *invocation,
    GVariant *secret)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@(oayays))",
                   secret));
}

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

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

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

/**
 * GkdExportedItemProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedItemProxy.
 */

struct _GkdExportedItemProxyPrivate
{
  GData *qdata;
};

static void gkd_exported_item_proxy_iface_init (GkdExportedItemIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedItemProxy, gkd_exported_item_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GkdExportedItemProxy)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_ITEM, gkd_exported_item_proxy_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedItemProxy, gkd_exported_item_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_ITEM, gkd_exported_item_proxy_iface_init));

#endif
static void
gkd_exported_item_proxy_finalize (GObject *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (gkd_exported_item_proxy_parent_class)->finalize (object);
}

static void
gkd_exported_item_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 < 6);
  info = _gkd_exported_item_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
gkd_exported_item_proxy_set_property_cb (GDBusProxy *proxy,
  GAsyncResult *res,
  gpointer      user_data)
{
  const _ExtendedGDBusPropertyInfo *info = user_data;
  GError *error;
  GVariant *_ret;
  error = NULL;
  _ret = g_dbus_proxy_call_finish (proxy, res, &error);
  if (!_ret)
    {
      g_warning ("Error setting property '%s' on interface org.freedesktop.Secret.Item: %s (%s, %d)",
                 info->parent_struct.name, 
                 error->message, g_quark_to_string (error->domain), error->code);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (_ret);
    }
}

static void
gkd_exported_item_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 < 6);
  info = _gkd_exported_item_property_info_pointers[prop_id - 1];
  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  g_dbus_proxy_call (G_DBUS_PROXY (object),
    "org.freedesktop.DBus.Properties.Set",
    g_variant_new ("(ssv)", "org.freedesktop.Secret.Item", info->parent_struct.name, variant),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    NULL, (GAsyncReadyCallback) gkd_exported_item_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  g_variant_unref (variant);
}

static void
gkd_exported_item_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 *) &_gkd_exported_item_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], GKD_TYPE_EXPORTED_ITEM);
  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, GKD_TYPE_EXPORTED_ITEM);
  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
gkd_exported_item_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_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 *) &_gkd_exported_item_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 *) &_gkd_exported_item_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static gboolean 
gkd_exported_item_proxy_get_locked (GkdExportedItem *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  GVariant *variant;
  gboolean value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Locked");
  if (variant != NULL)
    {
      value = g_variant_get_boolean (variant);
      g_variant_unref (variant);
    }
  return value;
}

static GVariant *
gkd_exported_item_proxy_get_attributes (GkdExportedItem *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  GVariant *variant;
  GVariant *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Attributes");
  value = variant;
  if (variant != NULL)
    g_variant_unref (variant);
  return value;
}

static const gchar *
gkd_exported_item_proxy_get_label (GkdExportedItem *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Label");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
gkd_exported_item_proxy_get_type_ (GkdExportedItem *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Type");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static guint64 
gkd_exported_item_proxy_get_created (GkdExportedItem *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  GVariant *variant;
  guint64 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Created");
  if (variant != NULL)
    {
      value = g_variant_get_uint64 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static guint64 
gkd_exported_item_proxy_get_modified (GkdExportedItem *object)
{
  GkdExportedItemProxy *proxy = GKD_EXPORTED_ITEM_PROXY (object);
  GVariant *variant;
  guint64 value = 0;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Modified");
  if (variant != NULL)
    {
      value = g_variant_get_uint64 (variant);
      g_variant_unref (variant);
    }
  return value;
}

static void
gkd_exported_item_proxy_init (GkdExportedItemProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = gkd_exported_item_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_ITEM_PROXY, GkdExportedItemProxyPrivate);
#endif

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

static void
gkd_exported_item_proxy_class_init (GkdExportedItemProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = gkd_exported_item_proxy_finalize;
  gobject_class->get_property = gkd_exported_item_proxy_get_property;
  gobject_class->set_property = gkd_exported_item_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = gkd_exported_item_proxy_g_signal;
  proxy_class->g_properties_changed = gkd_exported_item_proxy_g_properties_changed;

  gkd_exported_item_override_properties (gobject_class, 1);

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

static void
gkd_exported_item_proxy_iface_init (GkdExportedItemIface *iface)
{
  iface->get_locked = gkd_exported_item_proxy_get_locked;
  iface->get_attributes = gkd_exported_item_proxy_get_attributes;
  iface->get_label = gkd_exported_item_proxy_get_label;
  iface->get_type_ = gkd_exported_item_proxy_get_type_;
  iface->get_created = gkd_exported_item_proxy_get_created;
  iface->get_modified = gkd_exported_item_proxy_get_modified;
}

/**
 * gkd_exported_item_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-freedesktop-Secret-Item.top_of_page">org.freedesktop.Secret.Item</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 gkd_exported_item_proxy_new_finish() to get the result of the operation.
 *
 * See gkd_exported_item_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_item_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 (GKD_TYPE_EXPORTED_ITEM_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Item", NULL);
}

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

/**
 * gkd_exported_item_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-freedesktop-Secret-Item.top_of_page">org.freedesktop.Secret.Item</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_item_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedItemProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedItem *
gkd_exported_item_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GKD_TYPE_EXPORTED_ITEM_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Item", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_ITEM (ret);
  else
    return NULL;
}


/**
 * gkd_exported_item_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 gkd_exported_item_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 gkd_exported_item_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See gkd_exported_item_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_item_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 (GKD_TYPE_EXPORTED_ITEM_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Item", NULL);
}

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

/**
 * gkd_exported_item_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 gkd_exported_item_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_item_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedItemProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedItem *
gkd_exported_item_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 (GKD_TYPE_EXPORTED_ITEM_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Item", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_ITEM (ret);
  else
    return NULL;
}


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

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

/**
 * GkdExportedItemSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedItemSkeleton.
 */

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

static void
_gkd_exported_item_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)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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], GKD_TYPE_EXPORTED_ITEM);
  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, GKD_TYPE_EXPORTED_ITEM);
  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 *
_gkd_exported_item_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)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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 *) &_gkd_exported_item_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
_gkd_exported_item_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)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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 *) &_gkd_exported_item_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 _gkd_exported_item_skeleton_vtable =
{
  _gkd_exported_item_skeleton_handle_method_call,
  _gkd_exported_item_skeleton_handle_get_property,
  _gkd_exported_item_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
gkd_exported_item_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return gkd_exported_item_interface_info ();
}

static GDBusInterfaceVTable *
gkd_exported_item_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_gkd_exported_item_skeleton_vtable;
}

static GVariant *
gkd_exported_item_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_gkd_exported_item_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _gkd_exported_item_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _gkd_exported_item_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _gkd_exported_item_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Item", 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 _gkd_exported_item_emit_changed (gpointer user_data);

static void
gkd_exported_item_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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)
    _gkd_exported_item_emit_changed (skeleton);
}

static void gkd_exported_item_skeleton_iface_init (GkdExportedItemIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedItemSkeleton, gkd_exported_item_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GkdExportedItemSkeleton)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_ITEM, gkd_exported_item_skeleton_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedItemSkeleton, gkd_exported_item_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_ITEM, gkd_exported_item_skeleton_iface_init));

#endif
static void
gkd_exported_item_skeleton_finalize (GObject *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  guint n;
  for (n = 0; n < 6; 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 (gkd_exported_item_skeleton_parent_class)->finalize (object);
}

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

static gboolean
_gkd_exported_item_emit_changed (gpointer user_data)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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.freedesktop.Secret.Item",
                                           &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
_gkd_exported_item_schedule_emit_changed (GkdExportedItemSkeleton *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
gkd_exported_item_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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, _gkd_exported_item_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _gkd_exported_item_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
gkd_exported_item_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 6);
  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)
        _gkd_exported_item_schedule_emit_changed (skeleton, _gkd_exported_item_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
gkd_exported_item_skeleton_init (GkdExportedItemSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = gkd_exported_item_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_ITEM_SKELETON, GkdExportedItemSkeletonPrivate);
#endif

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

static gboolean 
gkd_exported_item_skeleton_get_locked (GkdExportedItem *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  gboolean value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_boolean (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static GVariant *
gkd_exported_item_skeleton_get_attributes (GkdExportedItem *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  GVariant *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_variant (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
gkd_exported_item_skeleton_get_label (GkdExportedItem *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_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 const gchar *
gkd_exported_item_skeleton_get_type_ (GkdExportedItem *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[3]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint64 
gkd_exported_item_skeleton_get_created (GkdExportedItem *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  guint64 value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint64 (&(skeleton->priv->properties[4]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static guint64 
gkd_exported_item_skeleton_get_modified (GkdExportedItem *object)
{
  GkdExportedItemSkeleton *skeleton = GKD_EXPORTED_ITEM_SKELETON (object);
  guint64 value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_uint64 (&(skeleton->priv->properties[5]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static void
gkd_exported_item_skeleton_class_init (GkdExportedItemSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = gkd_exported_item_skeleton_finalize;
  gobject_class->get_property = gkd_exported_item_skeleton_get_property;
  gobject_class->set_property = gkd_exported_item_skeleton_set_property;
  gobject_class->notify       = gkd_exported_item_skeleton_notify;


  gkd_exported_item_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = gkd_exported_item_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = gkd_exported_item_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = gkd_exported_item_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = gkd_exported_item_skeleton_dbus_interface_get_vtable;

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

static void
gkd_exported_item_skeleton_iface_init (GkdExportedItemIface *iface)
{
  iface->get_locked = gkd_exported_item_skeleton_get_locked;
  iface->get_attributes = gkd_exported_item_skeleton_get_attributes;
  iface->get_label = gkd_exported_item_skeleton_get_label;
  iface->get_type_ = gkd_exported_item_skeleton_get_type_;
  iface->get_created = gkd_exported_item_skeleton_get_created;
  iface->get_modified = gkd_exported_item_skeleton_get_modified;
}

/**
 * gkd_exported_item_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Item.top_of_page">org.freedesktop.Secret.Item</link>.
 *
 * Returns: (transfer full) (type GkdExportedItemSkeleton): The skeleton object.
 */
GkdExportedItem *
gkd_exported_item_skeleton_new (void)
{
  return GKD_EXPORTED_ITEM (g_object_new (GKD_TYPE_EXPORTED_ITEM_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.Secret.Session
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.Secret.Session ---- */

static const _ExtendedGDBusMethodInfo _gkd_exported_session_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _gkd_exported_session_method_info_pointers[] =
{
  &_gkd_exported_session_method_info_close,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _gkd_exported_session_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Session",
    (GDBusMethodInfo **) &_gkd_exported_session_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "exported-session",
};


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

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



/**
 * GkdExportedSession:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Session.top_of_page">org.freedesktop.Secret.Session</link>.
 */

/**
 * GkdExportedSessionIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #GkdExportedSession::handle-close signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Session.top_of_page">org.freedesktop.Secret.Session</link>.
 */

typedef GkdExportedSessionIface GkdExportedSessionInterface;
G_DEFINE_INTERFACE (GkdExportedSession, gkd_exported_session, G_TYPE_OBJECT);

static void
gkd_exported_session_default_init (GkdExportedSessionIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GkdExportedSession::handle-close:
   * @object: A #GkdExportedSession.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Session.Close">Close()</link> D-Bus method.
   *
   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gkd_exported_session_complete_close() 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-close",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedSessionIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

}

/**
 * gkd_exported_session_call_close:
 * @proxy: A #GkdExportedSessionProxy.
 * @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-freedesktop-Secret-Session.Close">Close()</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 gkd_exported_session_call_close_finish() to get the result of the operation.
 *
 * See gkd_exported_session_call_close_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_session_call_close (
    GkdExportedSession *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Close",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * gkd_exported_session_call_close_sync:
 * @proxy: A #GkdExportedSessionProxy.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Secret-Session.Close">Close()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_session_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_session_call_close_sync (
    GkdExportedSession *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Close",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_session_complete_close:
 * @object: A #GkdExportedSession.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Secret-Session.Close">Close()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void
gkd_exported_session_complete_close (
    GkdExportedSession *object,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * GkdExportedSessionProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedSessionProxy.
 */

struct _GkdExportedSessionProxyPrivate
{
  GData *qdata;
};

static void gkd_exported_session_proxy_iface_init (GkdExportedSessionIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedSessionProxy, gkd_exported_session_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GkdExportedSessionProxy)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SESSION, gkd_exported_session_proxy_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedSessionProxy, gkd_exported_session_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SESSION, gkd_exported_session_proxy_iface_init));

#endif
static void
gkd_exported_session_proxy_finalize (GObject *object)
{
  GkdExportedSessionProxy *proxy = GKD_EXPORTED_SESSION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (gkd_exported_session_proxy_parent_class)->finalize (object);
}

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

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

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

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

static void
gkd_exported_session_proxy_init (GkdExportedSessionProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = gkd_exported_session_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_SESSION_PROXY, GkdExportedSessionProxyPrivate);
#endif

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

static void
gkd_exported_session_proxy_class_init (GkdExportedSessionProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = gkd_exported_session_proxy_finalize;
  gobject_class->get_property = gkd_exported_session_proxy_get_property;
  gobject_class->set_property = gkd_exported_session_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = gkd_exported_session_proxy_g_signal;
  proxy_class->g_properties_changed = gkd_exported_session_proxy_g_properties_changed;

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

static void
gkd_exported_session_proxy_iface_init (GkdExportedSessionIface *iface)
{
}

/**
 * gkd_exported_session_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-freedesktop-Secret-Session.top_of_page">org.freedesktop.Secret.Session</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 gkd_exported_session_proxy_new_finish() to get the result of the operation.
 *
 * See gkd_exported_session_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_session_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (GKD_TYPE_EXPORTED_SESSION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Session", NULL);
}

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

/**
 * gkd_exported_session_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-freedesktop-Secret-Session.top_of_page">org.freedesktop.Secret.Session</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_session_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedSession *
gkd_exported_session_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GKD_TYPE_EXPORTED_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Session", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_SESSION (ret);
  else
    return NULL;
}


/**
 * gkd_exported_session_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (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 gkd_exported_session_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 gkd_exported_session_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See gkd_exported_session_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_session_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data)
{
  g_async_initable_new_async (GKD_TYPE_EXPORTED_SESSION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Session", NULL);
}

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

/**
 * gkd_exported_session_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (allow-none): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like gkd_exported_session_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_session_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedSession *
gkd_exported_session_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GKD_TYPE_EXPORTED_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Session", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_SESSION (ret);
  else
    return NULL;
}


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

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

/**
 * GkdExportedSessionSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedSessionSkeleton.
 */

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

static void
_gkd_exported_session_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  GkdExportedSessionSkeleton *skeleton = GKD_EXPORTED_SESSION_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], GKD_TYPE_EXPORTED_SESSION);
  g_value_set_object (&paramv[n++], skeleton);
  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  g_value_set_object (&paramv[n++], invocation);
  if (info->pass_fdlist)
    {
#ifdef G_OS_UNIX
      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
#else
      g_assert_not_reached ();
#endif
    }
  g_variant_iter_init (&iter, parameters);
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, GKD_TYPE_EXPORTED_SESSION);
  g_value_init (&return_value, G_TYPE_BOOLEAN);
  g_signal_emitv (paramv, signal_id, 0, &return_value);
  if (!g_value_get_boolean (&return_value))
    g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
  g_value_unset (&return_value);
  for (n = 0; n < num_params + num_extra; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

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

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

static const GDBusInterfaceVTable _gkd_exported_session_skeleton_vtable =
{
  _gkd_exported_session_skeleton_handle_method_call,
  _gkd_exported_session_skeleton_handle_get_property,
  _gkd_exported_session_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
gkd_exported_session_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return gkd_exported_session_interface_info ();
}

static GDBusInterfaceVTable *
gkd_exported_session_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_gkd_exported_session_skeleton_vtable;
}

static GVariant *
gkd_exported_session_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedSessionSkeleton *skeleton = GKD_EXPORTED_SESSION_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_gkd_exported_session_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _gkd_exported_session_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _gkd_exported_session_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _gkd_exported_session_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Session", info->name, NULL, skeleton);
          if (value != NULL)
            {
              g_variant_take_ref (value);
              g_variant_builder_add (&builder, "{sv}", info->name, value);
              g_variant_unref (value);
            }
        }
    }
out:
  return g_variant_builder_end (&builder);
}

static void
gkd_exported_session_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
}

static void gkd_exported_session_skeleton_iface_init (GkdExportedSessionIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedSessionSkeleton, gkd_exported_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GkdExportedSessionSkeleton)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SESSION, gkd_exported_session_skeleton_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedSessionSkeleton, gkd_exported_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_SESSION, gkd_exported_session_skeleton_iface_init));

#endif
static void
gkd_exported_session_skeleton_finalize (GObject *object)
{
  GkdExportedSessionSkeleton *skeleton = GKD_EXPORTED_SESSION_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 (gkd_exported_session_skeleton_parent_class)->finalize (object);
}

static void
gkd_exported_session_skeleton_init (GkdExportedSessionSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = gkd_exported_session_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_SESSION_SKELETON, GkdExportedSessionSkeletonPrivate);
#endif

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

static void
gkd_exported_session_skeleton_class_init (GkdExportedSessionSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = gkd_exported_session_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = gkd_exported_session_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = gkd_exported_session_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = gkd_exported_session_skeleton_dbus_interface_get_vtable;

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

static void
gkd_exported_session_skeleton_iface_init (GkdExportedSessionIface *iface)
{
}

/**
 * gkd_exported_session_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Session.top_of_page">org.freedesktop.Secret.Session</link>.
 *
 * Returns: (transfer full) (type GkdExportedSessionSkeleton): The skeleton object.
 */
GkdExportedSession *
gkd_exported_session_skeleton_new (void)
{
  return GKD_EXPORTED_SESSION (g_object_new (GKD_TYPE_EXPORTED_SESSION_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.freedesktop.Secret.Prompt
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.freedesktop.Secret.Prompt ---- */

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_prompt_method_info_prompt_IN_ARG_pointers[] =
{
  &_gkd_exported_prompt_method_info_prompt_IN_ARG_window_id,
  NULL
};

static const _ExtendedGDBusMethodInfo _gkd_exported_prompt_method_info_prompt =
{
  {
    -1,
    (gchar *) "Prompt",
    (GDBusArgInfo **) &_gkd_exported_prompt_method_info_prompt_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-prompt",
  FALSE
};

static const _ExtendedGDBusMethodInfo _gkd_exported_prompt_method_info_dismiss =
{
  {
    -1,
    (gchar *) "Dismiss",
    NULL,
    NULL,
    NULL
  },
  "handle-dismiss",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const _gkd_exported_prompt_method_info_pointers[] =
{
  &_gkd_exported_prompt_method_info_prompt,
  &_gkd_exported_prompt_method_info_dismiss,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const _gkd_exported_prompt_signal_info_completed_ARG_pointers[] =
{
  &_gkd_exported_prompt_signal_info_completed_ARG_dismissed,
  &_gkd_exported_prompt_signal_info_completed_ARG_result,
  NULL
};

static const _ExtendedGDBusSignalInfo _gkd_exported_prompt_signal_info_completed =
{
  {
    -1,
    (gchar *) "Completed",
    (GDBusArgInfo **) &_gkd_exported_prompt_signal_info_completed_ARG_pointers,
    NULL
  },
  "completed"
};

static const _ExtendedGDBusSignalInfo * const _gkd_exported_prompt_signal_info_pointers[] =
{
  &_gkd_exported_prompt_signal_info_completed,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _gkd_exported_prompt_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Prompt",
    (GDBusMethodInfo **) &_gkd_exported_prompt_method_info_pointers,
    (GDBusSignalInfo **) &_gkd_exported_prompt_signal_info_pointers,
    NULL,
    NULL
  },
  "exported-prompt",
};


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

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



/**
 * GkdExportedPrompt:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Prompt.top_of_page">org.freedesktop.Secret.Prompt</link>.
 */

/**
 * GkdExportedPromptIface:
 * @parent_iface: The parent interface.
 * @handle_dismiss: Handler for the #GkdExportedPrompt::handle-dismiss signal.
 * @handle_prompt: Handler for the #GkdExportedPrompt::handle-prompt signal.
 * @completed: Handler for the #GkdExportedPrompt::completed signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Prompt.top_of_page">org.freedesktop.Secret.Prompt</link>.
 */

typedef GkdExportedPromptIface GkdExportedPromptInterface;
G_DEFINE_INTERFACE (GkdExportedPrompt, gkd_exported_prompt, G_TYPE_OBJECT);

static void
gkd_exported_prompt_default_init (GkdExportedPromptIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * GkdExportedPrompt::handle-prompt:
   * @object: A #GkdExportedPrompt.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_window_id: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Prompt.Prompt">Prompt()</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 gkd_exported_prompt_complete_prompt() 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-prompt",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedPromptIface, handle_prompt),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * GkdExportedPrompt::handle-dismiss:
   * @object: A #GkdExportedPrompt.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Secret-Prompt.Dismiss">Dismiss()</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 gkd_exported_prompt_complete_dismiss() 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-dismiss",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedPromptIface, handle_dismiss),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject signals for received D-Bus signals: */
  /**
   * GkdExportedPrompt::completed:
   * @object: A #GkdExportedPrompt.
   * @arg_dismissed: Argument.
   * @arg_result: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Secret-Prompt.Completed">"Completed"</link> is received.
   *
   * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
   */
  g_signal_new ("completed",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (GkdExportedPromptIface, completed),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    2, G_TYPE_BOOLEAN, G_TYPE_VARIANT);

}

/**
 * gkd_exported_prompt_emit_completed:
 * @object: A #GkdExportedPrompt.
 * @arg_dismissed: Argument to pass with the signal.
 * @arg_result: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-freedesktop-Secret-Prompt.Completed">"Completed"</link> D-Bus signal.
 */
void
gkd_exported_prompt_emit_completed (
    GkdExportedPrompt *object,
    gboolean arg_dismissed,
    GVariant *arg_result)
{
  g_signal_emit_by_name (object, "completed", arg_dismissed, arg_result);
}

/**
 * gkd_exported_prompt_call_prompt:
 * @proxy: A #GkdExportedPromptProxy.
 * @arg_window_id: 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-freedesktop-Secret-Prompt.Prompt">Prompt()</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 gkd_exported_prompt_call_prompt_finish() to get the result of the operation.
 *
 * See gkd_exported_prompt_call_prompt_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_prompt_call_prompt (
    GkdExportedPrompt *proxy,
    const gchar *arg_window_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Prompt",
    g_variant_new ("(s)",
                   arg_window_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * gkd_exported_prompt_call_prompt_sync:
 * @proxy: A #GkdExportedPromptProxy.
 * @arg_window_id: 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-freedesktop-Secret-Prompt.Prompt">Prompt()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_prompt_call_prompt() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
gkd_exported_prompt_call_prompt_sync (
    GkdExportedPrompt *proxy,
    const gchar *arg_window_id,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Prompt",
    g_variant_new ("(s)",
                   arg_window_id),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * gkd_exported_prompt_call_dismiss:
 * @proxy: A #GkdExportedPromptProxy.
 * @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-freedesktop-Secret-Prompt.Dismiss">Dismiss()</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 gkd_exported_prompt_call_dismiss_finish() to get the result of the operation.
 *
 * See gkd_exported_prompt_call_dismiss_sync() for the synchronous, blocking version of this method.
 */
void
gkd_exported_prompt_call_dismiss (
    GkdExportedPrompt *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Dismiss",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

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

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

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

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

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

/**
 * GkdExportedPromptProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedPromptProxy.
 */

struct _GkdExportedPromptProxyPrivate
{
  GData *qdata;
};

static void gkd_exported_prompt_proxy_iface_init (GkdExportedPromptIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedPromptProxy, gkd_exported_prompt_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (GkdExportedPromptProxy)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PROMPT, gkd_exported_prompt_proxy_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedPromptProxy, gkd_exported_prompt_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PROMPT, gkd_exported_prompt_proxy_iface_init));

#endif
static void
gkd_exported_prompt_proxy_finalize (GObject *object)
{
  GkdExportedPromptProxy *proxy = GKD_EXPORTED_PROMPT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (gkd_exported_prompt_proxy_parent_class)->finalize (object);
}

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

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

static void
gkd_exported_prompt_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 *) &_gkd_exported_prompt_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], GKD_TYPE_EXPORTED_PROMPT);
  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, GKD_TYPE_EXPORTED_PROMPT);
  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
gkd_exported_prompt_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  GkdExportedPromptProxy *proxy = GKD_EXPORTED_PROMPT_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 *) &_gkd_exported_prompt_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 *) &_gkd_exported_prompt_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
gkd_exported_prompt_proxy_init (GkdExportedPromptProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = gkd_exported_prompt_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GKD_TYPE_EXPORTED_PROMPT_PROXY, GkdExportedPromptProxyPrivate);
#endif

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

static void
gkd_exported_prompt_proxy_class_init (GkdExportedPromptProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = gkd_exported_prompt_proxy_finalize;
  gobject_class->get_property = gkd_exported_prompt_proxy_get_property;
  gobject_class->set_property = gkd_exported_prompt_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = gkd_exported_prompt_proxy_g_signal;
  proxy_class->g_properties_changed = gkd_exported_prompt_proxy_g_properties_changed;

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

static void
gkd_exported_prompt_proxy_iface_init (GkdExportedPromptIface *iface)
{
}

/**
 * gkd_exported_prompt_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-freedesktop-Secret-Prompt.top_of_page">org.freedesktop.Secret.Prompt</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 gkd_exported_prompt_proxy_new_finish() to get the result of the operation.
 *
 * See gkd_exported_prompt_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_prompt_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 (GKD_TYPE_EXPORTED_PROMPT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Prompt", NULL);
}

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

/**
 * gkd_exported_prompt_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-freedesktop-Secret-Prompt.top_of_page">org.freedesktop.Secret.Prompt</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_prompt_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedPromptProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedPrompt *
gkd_exported_prompt_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (GKD_TYPE_EXPORTED_PROMPT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Prompt", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_PROMPT (ret);
  else
    return NULL;
}


/**
 * gkd_exported_prompt_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 gkd_exported_prompt_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 gkd_exported_prompt_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See gkd_exported_prompt_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
gkd_exported_prompt_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 (GKD_TYPE_EXPORTED_PROMPT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Prompt", NULL);
}

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

/**
 * gkd_exported_prompt_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 gkd_exported_prompt_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See gkd_exported_prompt_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type GkdExportedPromptProxy): The constructed proxy object or %NULL if @error is set.
 */
GkdExportedPrompt *
gkd_exported_prompt_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 (GKD_TYPE_EXPORTED_PROMPT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Secret.Prompt", NULL);
  if (ret != NULL)
    return GKD_EXPORTED_PROMPT (ret);
  else
    return NULL;
}


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

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

/**
 * GkdExportedPromptSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #GkdExportedPromptSkeleton.
 */

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

static void
_gkd_exported_prompt_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)
{
  GkdExportedPromptSkeleton *skeleton = GKD_EXPORTED_PROMPT_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], GKD_TYPE_EXPORTED_PROMPT);
  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, GKD_TYPE_EXPORTED_PROMPT);
  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 *
_gkd_exported_prompt_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)
{
  GkdExportedPromptSkeleton *skeleton = GKD_EXPORTED_PROMPT_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 *) &_gkd_exported_prompt_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
_gkd_exported_prompt_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)
{
  GkdExportedPromptSkeleton *skeleton = GKD_EXPORTED_PROMPT_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 *) &_gkd_exported_prompt_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 _gkd_exported_prompt_skeleton_vtable =
{
  _gkd_exported_prompt_skeleton_handle_method_call,
  _gkd_exported_prompt_skeleton_handle_get_property,
  _gkd_exported_prompt_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
gkd_exported_prompt_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return gkd_exported_prompt_interface_info ();
}

static GDBusInterfaceVTable *
gkd_exported_prompt_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_gkd_exported_prompt_skeleton_vtable;
}

static GVariant *
gkd_exported_prompt_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  GkdExportedPromptSkeleton *skeleton = GKD_EXPORTED_PROMPT_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_gkd_exported_prompt_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _gkd_exported_prompt_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _gkd_exported_prompt_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _gkd_exported_prompt_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Prompt", 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
gkd_exported_prompt_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
}

static void
_gkd_exported_prompt_on_signal_completed (
    GkdExportedPrompt *object,
    gboolean arg_dismissed,
    GVariant *arg_result)
{
  GkdExportedPromptSkeleton *skeleton = GKD_EXPORTED_PROMPT_SKELETON (object);

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

  signal_variant = g_variant_ref_sink (g_variant_new ("(b@v)",
                   arg_dismissed,
                   arg_result));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Secret.Prompt", "Completed",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void gkd_exported_prompt_skeleton_iface_init (GkdExportedPromptIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (GkdExportedPromptSkeleton, gkd_exported_prompt_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (GkdExportedPromptSkeleton)
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PROMPT, gkd_exported_prompt_skeleton_iface_init));

#else
G_DEFINE_TYPE_WITH_CODE (GkdExportedPromptSkeleton, gkd_exported_prompt_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (GKD_TYPE_EXPORTED_PROMPT, gkd_exported_prompt_skeleton_iface_init));

#endif
static void
gkd_exported_prompt_skeleton_finalize (GObject *object)
{
  GkdExportedPromptSkeleton *skeleton = GKD_EXPORTED_PROMPT_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 (gkd_exported_prompt_skeleton_parent_class)->finalize (object);
}

static void
gkd_exported_prompt_skeleton_init (GkdExportedPromptSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = gkd_exported_prompt_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GKD_TYPE_EXPORTED_PROMPT_SKELETON, GkdExportedPromptSkeletonPrivate);
#endif

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

static void
gkd_exported_prompt_skeleton_class_init (GkdExportedPromptSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = gkd_exported_prompt_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = gkd_exported_prompt_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = gkd_exported_prompt_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = gkd_exported_prompt_skeleton_dbus_interface_get_vtable;

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

static void
gkd_exported_prompt_skeleton_iface_init (GkdExportedPromptIface *iface)
{
  iface->completed = _gkd_exported_prompt_on_signal_completed;
}

/**
 * gkd_exported_prompt_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Secret-Prompt.top_of_page">org.freedesktop.Secret.Prompt</link>.
 *
 * Returns: (transfer full) (type GkdExportedPromptSkeleton): The skeleton object.
 */
GkdExportedPrompt *
gkd_exported_prompt_skeleton_new (void)
{
  return GKD_EXPORTED_PROMPT (g_object_new (GKD_TYPE_EXPORTED_PROMPT_SKELETON, NULL));
}

