#define GLIB_DISABLE_DEPRECATION_WARNINGS
/*
 * Generated by gdbus-codegen 2.33.3. 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 "secret-dbus-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:SecretGenService
 * @title: SecretGenService
 * @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 __secret_gen_service_method_info_open_session_IN_ARG_algorithm =
{
  {
    -1,
    (gchar *) "algorithm",
    (gchar *) "s",
    NULL
  },
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_open_session_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_open_session_IN_ARG_algorithm,
  &__secret_gen_service_method_info_open_session_IN_ARG_input,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_open_session_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_open_session_OUT_ARG_output,
  &__secret_gen_service_method_info_open_session_OUT_ARG_result,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_open_session =
{
  {
    -1,
    (gchar *) "OpenSession",
    (GDBusArgInfo **) &__secret_gen_service_method_info_open_session_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_open_session_OUT_ARG_pointers,
    NULL
  },
  "handle-open-session",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_create_collection_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_create_collection_IN_ARG_properties,
  &__secret_gen_service_method_info_create_collection_IN_ARG_alias,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_create_collection_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_create_collection_OUT_ARG_collection,
  &__secret_gen_service_method_info_create_collection_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_create_collection =
{
  {
    -1,
    (gchar *) "CreateCollection",
    (GDBusArgInfo **) &__secret_gen_service_method_info_create_collection_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_create_collection_OUT_ARG_pointers,
    NULL
  },
  "handle-create-collection",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_search_items_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_search_items_IN_ARG_attributes,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_search_items_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_search_items_OUT_ARG_unlocked,
  &__secret_gen_service_method_info_search_items_OUT_ARG_locked,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_search_items =
{
  {
    -1,
    (gchar *) "SearchItems",
    (GDBusArgInfo **) &__secret_gen_service_method_info_search_items_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_search_items_OUT_ARG_pointers,
    NULL
  },
  "handle-search-items",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_unlock_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_unlock_IN_ARG_objects,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_unlock_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_unlock_OUT_ARG_unlocked,
  &__secret_gen_service_method_info_unlock_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_unlock =
{
  {
    -1,
    (gchar *) "Unlock",
    (GDBusArgInfo **) &__secret_gen_service_method_info_unlock_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_unlock_OUT_ARG_pointers,
    NULL
  },
  "handle-unlock",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_lock_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_lock_IN_ARG_objects,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_lock_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_lock_OUT_ARG_locked,
  &__secret_gen_service_method_info_lock_OUT_ARG_Prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_lock =
{
  {
    -1,
    (gchar *) "Lock",
    (GDBusArgInfo **) &__secret_gen_service_method_info_lock_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_lock_OUT_ARG_pointers,
    NULL
  },
  "handle-lock",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_get_secrets_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_get_secrets_IN_ARG_items,
  &__secret_gen_service_method_info_get_secrets_IN_ARG_session,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_get_secrets_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_get_secrets_OUT_ARG_secrets,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_get_secrets =
{
  {
    -1,
    (gchar *) "GetSecrets",
    (GDBusArgInfo **) &__secret_gen_service_method_info_get_secrets_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_get_secrets_OUT_ARG_pointers,
    NULL
  },
  "handle-get-secrets",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_read_alias_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_read_alias_IN_ARG_name,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_read_alias_OUT_ARG_pointers[] =
{
  &__secret_gen_service_method_info_read_alias_OUT_ARG_collection,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_service_method_info_read_alias =
{
  {
    -1,
    (gchar *) "ReadAlias",
    (GDBusArgInfo **) &__secret_gen_service_method_info_read_alias_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_service_method_info_read_alias_OUT_ARG_pointers,
    NULL
  },
  "handle-read-alias",
  FALSE
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_method_info_set_alias_IN_ARG_pointers[] =
{
  &__secret_gen_service_method_info_set_alias_IN_ARG_name,
  &__secret_gen_service_method_info_set_alias_IN_ARG_collection,
  NULL
};

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

static const _ExtendedGDBusMethodInfo * const __secret_gen_service_method_info_pointers[] =
{
  &__secret_gen_service_method_info_open_session,
  &__secret_gen_service_method_info_create_collection,
  &__secret_gen_service_method_info_search_items,
  &__secret_gen_service_method_info_unlock,
  &__secret_gen_service_method_info_lock,
  &__secret_gen_service_method_info_get_secrets,
  &__secret_gen_service_method_info_read_alias,
  &__secret_gen_service_method_info_set_alias,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_signal_info_collection_created_ARG_pointers[] =
{
  &__secret_gen_service_signal_info_collection_created_ARG_collection,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_signal_info_collection_deleted_ARG_pointers[] =
{
  &__secret_gen_service_signal_info_collection_deleted_ARG_collection,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_service_signal_info_collection_changed_ARG_pointers[] =
{
  &__secret_gen_service_signal_info_collection_changed_ARG_collection,
  NULL
};

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

static const _ExtendedGDBusSignalInfo * const __secret_gen_service_signal_info_pointers[] =
{
  &__secret_gen_service_signal_info_collection_created,
  &__secret_gen_service_signal_info_collection_deleted,
  &__secret_gen_service_signal_info_collection_changed,
  NULL
};

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

static const _ExtendedGDBusPropertyInfo * const __secret_gen_service_property_info_pointers[] =
{
  &__secret_gen_service_property_info_collections,
  NULL
};

static const _ExtendedGDBusInterfaceInfo __secret_gen_service_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Service",
    (GDBusMethodInfo **) &__secret_gen_service_method_info_pointers,
    (GDBusSignalInfo **) &__secret_gen_service_signal_info_pointers,
    (GDBusPropertyInfo **) &__secret_gen_service_property_info_pointers,
    NULL
  },
  "service",
};


/**
 * _secret_gen_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 *
_secret_gen_service_interface_info (void)
{
  return (GDBusInterfaceInfo *) &__secret_gen_service_interface_info;
}

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



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

/**
 * SecretGenServiceIface:
 * @parent_iface: The parent interface.
 * @handle_create_collection: Handler for the #SecretGenService::handle-create-collection signal.
 * @handle_get_secrets: Handler for the #SecretGenService::handle-get-secrets signal.
 * @handle_lock: Handler for the #SecretGenService::handle-lock signal.
 * @handle_open_session: Handler for the #SecretGenService::handle-open-session signal.
 * @handle_read_alias: Handler for the #SecretGenService::handle-read-alias signal.
 * @handle_search_items: Handler for the #SecretGenService::handle-search-items signal.
 * @handle_set_alias: Handler for the #SecretGenService::handle-set-alias signal.
 * @handle_unlock: Handler for the #SecretGenService::handle-unlock signal.
 * @get_collections: Getter for the #SecretGenService:collections property.
 * @collection_changed: Handler for the #SecretGenService::collection-changed signal.
 * @collection_created: Handler for the #SecretGenService::collection-created signal.
 * @collection_deleted: Handler for the #SecretGenService::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>.
 */

static void
_secret_gen_service_default_init (SecretGenServiceIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * SecretGenService::handle-open-session:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, 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);

  /**
   * SecretGenService::handle-create-collection:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, 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);

  /**
   * SecretGenService::handle-search-items:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, 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);

  /**
   * SecretGenService::handle-unlock:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, handle_unlock),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /**
   * SecretGenService::handle-lock:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, handle_lock),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /**
   * SecretGenService::handle-get-secrets:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, 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);

  /**
   * SecretGenService::handle-read-alias:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, 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);

  /**
   * SecretGenService::handle-set-alias:
   * @object: A #SecretGenService.
   * @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 _secret_gen_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 (SecretGenServiceIface, 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: */
  /**
   * SecretGenService::collection-created:
   * @object: A #SecretGenService.
   * @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 (SecretGenServiceIface, collection_created),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * SecretGenService::collection-deleted:
   * @object: A #SecretGenService.
   * @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 (SecretGenServiceIface, collection_deleted),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * SecretGenService::collection-changed:
   * @object: A #SecretGenService.
   * @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 (SecretGenServiceIface, collection_changed),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * SecretGenService: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));
}

typedef SecretGenServiceIface SecretGenServiceInterface;
G_DEFINE_INTERFACE (SecretGenService, _secret_gen_service, G_TYPE_OBJECT);

/**
 * _secret_gen_service_get_collections: (skip)
 * @object: A #SecretGenService.
 *
 * 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 _secret_gen_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 *
_secret_gen_service_get_collections (SecretGenService *object)
{
  return SECRET_GEN_SERVICE_GET_IFACE (object)->get_collections (object);
}

/**
 * _secret_gen_service_dup_collections: (skip)
 * @object: A #SecretGenService.
 *
 * 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 **
_secret_gen_service_dup_collections (SecretGenService *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "collections", &value, NULL);
  return value;
}

/**
 * _secret_gen_service_set_collections: (skip)
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_set_collections (SecretGenService *object, const gchar *const *value)
{
  g_object_set (G_OBJECT (object), "collections", value, NULL);
}

/**
 * _secret_gen_service_emit_collection_created:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_emit_collection_created (
    SecretGenService *object,
    const gchar *arg_collection)
{
  g_signal_emit_by_name (object, "collection-created", arg_collection);
}

/**
 * _secret_gen_service_emit_collection_deleted:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_emit_collection_deleted (
    SecretGenService *object,
    const gchar *arg_collection)
{
  g_signal_emit_by_name (object, "collection-deleted", arg_collection);
}

/**
 * _secret_gen_service_emit_collection_changed:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_emit_collection_changed (
    SecretGenService *object,
    const gchar *arg_collection)
{
  g_signal_emit_by_name (object, "collection-changed", arg_collection);
}

/**
 * _secret_gen_service_call_open_session:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_open_session_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_open_session_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_open_session (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_open_session_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_open_session() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_open_session_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_create_collection:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_create_collection_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_create_collection_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_create_collection (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_create_collection_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_create_collection() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_create_collection_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_search_items:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_search_items_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_search_items_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_search_items (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_search_items_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_search_items() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_search_items_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_unlock:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_unlock_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_unlock_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_unlock (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_unlock_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_unlock() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_unlock_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_lock:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_lock_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_lock_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_lock (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_lock_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_lock() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_lock_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_get_secrets:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_get_secrets_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_get_secrets_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_get_secrets (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_get_secrets_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_get_secrets() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_get_secrets_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_read_alias:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_read_alias_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_read_alias_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_read_alias (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_read_alias_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_read_alias() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_read_alias_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_call_set_alias:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_set_alias_finish() to get the result of the operation.
 *
 * See _secret_gen_service_call_set_alias_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_service_call_set_alias (
    SecretGenService *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);
}

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

/**
 * _secret_gen_service_call_set_alias_sync:
 * @proxy: A #SecretGenServiceProxy.
 * @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 _secret_gen_service_call_set_alias() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_service_call_set_alias_sync (
    SecretGenService *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;
}

/**
 * _secret_gen_service_complete_open_session:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_open_session (
    SecretGenService *object,
    GDBusMethodInvocation *invocation,
    GVariant *output,
    const gchar *result)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@vo)",
                   output,
                   result));
}

/**
 * _secret_gen_service_complete_create_collection:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_create_collection (
    SecretGenService *object,
    GDBusMethodInvocation *invocation,
    const gchar *collection,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(oo)",
                   collection,
                   prompt));
}

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

/**
 * _secret_gen_service_complete_unlock:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_unlock (
    SecretGenService *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *unlocked,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^aoo)",
                   unlocked,
                   prompt));
}

/**
 * _secret_gen_service_complete_lock:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_lock (
    SecretGenService *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *locked,
    const gchar *Prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^aoo)",
                   locked,
                   Prompt));
}

/**
 * _secret_gen_service_complete_get_secrets:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_get_secrets (
    SecretGenService *object,
    GDBusMethodInvocation *invocation,
    GVariant *secrets)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@a{o(oayays)})",
                   secrets));
}

/**
 * _secret_gen_service_complete_read_alias:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_read_alias (
    SecretGenService *object,
    GDBusMethodInvocation *invocation,
    const gchar *collection)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   collection));
}

/**
 * _secret_gen_service_complete_set_alias:
 * @object: A #SecretGenService.
 * @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
_secret_gen_service_complete_set_alias (
    SecretGenService *object,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * SecretGenServiceProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenServiceProxy.
 */

struct _SecretGenServiceProxyPrivate
{
  GData *qdata;
};

static void _secret_gen_service_proxy_iface_init (SecretGenServiceIface *iface);

G_DEFINE_TYPE_WITH_CODE (SecretGenServiceProxy, _secret_gen_service_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_SERVICE, _secret_gen_service_proxy_iface_init));

static void
_secret_gen_service_proxy_finalize (GObject *object)
{
  SecretGenServiceProxy *proxy = SECRET_GEN_SERVICE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (_secret_gen_service_proxy_parent_class)->finalize (object);
}

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

static void
_secret_gen_service_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 1);
  info = __secret_gen_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) _secret_gen_service_proxy_set_property_cb, (gpointer) info);
  g_variant_unref (variant);
}

static void
_secret_gen_service_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name,
  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 *) &__secret_gen_service_interface_info, 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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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
_secret_gen_service_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  SecretGenServiceProxy *proxy = SECRET_GEN_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 *) &__secret_gen_service_interface_info, 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 *) &__secret_gen_service_interface_info, 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 *
_secret_gen_service_proxy_get_collections (SecretGenService *object)
{
  SecretGenServiceProxy *proxy = SECRET_GEN_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
_secret_gen_service_proxy_init (SecretGenServiceProxy *proxy)
{
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, SECRET_GEN_TYPE_SERVICE_PROXY, SecretGenServiceProxyPrivate);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), _secret_gen_service_interface_info ());
}

static void
_secret_gen_service_proxy_class_init (SecretGenServiceProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  g_type_class_add_private (klass, sizeof (SecretGenServiceProxyPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = _secret_gen_service_proxy_finalize;
  gobject_class->get_property = _secret_gen_service_proxy_get_property;
  gobject_class->set_property = _secret_gen_service_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = _secret_gen_service_proxy_g_signal;
  proxy_class->g_properties_changed = _secret_gen_service_proxy_g_properties_changed;


  _secret_gen_service_override_properties (gobject_class, 1);
}

static void
_secret_gen_service_proxy_iface_init (SecretGenServiceIface *iface)
{
  iface->get_collections = _secret_gen_service_proxy_get_collections;
}

/**
 * _secret_gen_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 _secret_gen_service_proxy_new_finish() to get the result of the operation.
 *
 * See _secret_gen_service_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_service_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenServiceProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenService *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_SERVICE (ret);
  else
    return NULL;
}


/**
 * _secret_gen_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 _secret_gen_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 _secret_gen_service_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See _secret_gen_service_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_service_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See _secret_gen_service_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenServiceProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenService *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_SERVICE (ret);
  else
    return NULL;
}


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

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

/**
 * SecretGenServiceSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenServiceSkeleton.
 */

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

static void
__secret_gen_service_skeleton_handle_method_call (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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 *
__secret_gen_service_skeleton_handle_get_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_service_interface_info, 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
__secret_gen_service_skeleton_handle_set_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_service_interface_info, 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 __secret_gen_service_skeleton_vtable =
{
  __secret_gen_service_skeleton_handle_method_call,
  __secret_gen_service_skeleton_handle_get_property,
  __secret_gen_service_skeleton_handle_set_property
};

static GDBusInterfaceInfo *
_secret_gen_service_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
{
  return _secret_gen_service_interface_info ();
}

static GDBusInterfaceVTable *
_secret_gen_service_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
{
  return (GDBusInterfaceVTable *) &__secret_gen_service_skeleton_vtable;
}

static GVariant *
_secret_gen_service_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_SERVICE_SKELETON (_skeleton);

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

static void
_secret_gen_service_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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)
    __secret_gen_service_emit_changed (skeleton);
}

static void
__secret_gen_service_on_signal_collection_created (
    SecretGenService *object,
    const gchar *arg_collection)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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
__secret_gen_service_on_signal_collection_deleted (
    SecretGenService *object,
    const gchar *arg_collection)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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
__secret_gen_service_on_signal_collection_changed (
    SecretGenService *object,
    const gchar *arg_collection)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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 _secret_gen_service_skeleton_iface_init (SecretGenServiceIface *iface);
G_DEFINE_TYPE_WITH_CODE (SecretGenServiceSkeleton, _secret_gen_service_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_SERVICE, _secret_gen_service_skeleton_iface_init));

static void
_secret_gen_service_skeleton_finalize (GObject *object)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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 (_secret_gen_service_skeleton_parent_class)->finalize (object);
}

static void
_secret_gen_service_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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
__secret_gen_service_emit_changed (gpointer user_data)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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, *l;
      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 (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.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
__secret_gen_service_schedule_emit_changed (SecretGenServiceSkeleton *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
_secret_gen_service_skeleton_notify (GObject      *object,
  GParamSpec *pspec)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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, __secret_gen_service_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
_secret_gen_service_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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)
        __secret_gen_service_schedule_emit_changed (skeleton, __secret_gen_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
_secret_gen_service_skeleton_init (SecretGenServiceSkeleton *skeleton)
{
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, SECRET_GEN_TYPE_SERVICE_SKELETON, SecretGenServiceSkeletonPrivate);
  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 *
_secret_gen_service_skeleton_get_collections (SecretGenService *object)
{
  SecretGenServiceSkeleton *skeleton = SECRET_GEN_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
_secret_gen_service_skeleton_class_init (SecretGenServiceSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  g_type_class_add_private (klass, sizeof (SecretGenServiceSkeletonPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = _secret_gen_service_skeleton_finalize;
  gobject_class->get_property = _secret_gen_service_skeleton_get_property;
  gobject_class->set_property = _secret_gen_service_skeleton_set_property;
  gobject_class->notify       = _secret_gen_service_skeleton_notify;


  _secret_gen_service_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = _secret_gen_service_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = _secret_gen_service_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = _secret_gen_service_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = _secret_gen_service_skeleton_dbus_interface_get_vtable;
}

static void
_secret_gen_service_skeleton_iface_init (SecretGenServiceIface *iface)
{
  iface->collection_created = __secret_gen_service_on_signal_collection_created;
  iface->collection_deleted = __secret_gen_service_on_signal_collection_deleted;
  iface->collection_changed = __secret_gen_service_on_signal_collection_changed;
  iface->get_collections = _secret_gen_service_skeleton_get_collections;
}

/**
 * _secret_gen_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 SecretGenServiceSkeleton): The skeleton object.
 */
SecretGenService *
_secret_gen_service_skeleton_new (void)
{
  return SECRET_GEN_SERVICE (g_object_new (SECRET_GEN_TYPE_SERVICE_SKELETON, NULL));
}

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

/**
 * SECTION:SecretGenCollection
 * @title: SecretGenCollection
 * @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 __secret_gen_collection_method_info_delete_OUT_ARG_prompt =
{
  {
    -1,
    (gchar *) "prompt",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_method_info_delete_OUT_ARG_pointers[] =
{
  &__secret_gen_collection_method_info_delete_OUT_ARG_prompt,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_method_info_search_items_IN_ARG_pointers[] =
{
  &__secret_gen_collection_method_info_search_items_IN_ARG_attributes,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_method_info_search_items_OUT_ARG_pointers[] =
{
  &__secret_gen_collection_method_info_search_items_OUT_ARG_results,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_collection_method_info_search_items =
{
  {
    -1,
    (gchar *) "SearchItems",
    (GDBusArgInfo **) &__secret_gen_collection_method_info_search_items_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_collection_method_info_search_items_OUT_ARG_pointers,
    NULL
  },
  "handle-search-items",
  FALSE
};

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

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_method_info_create_item_IN_ARG_pointers[] =
{
  &__secret_gen_collection_method_info_create_item_IN_ARG_properties,
  &__secret_gen_collection_method_info_create_item_IN_ARG_secret,
  &__secret_gen_collection_method_info_create_item_IN_ARG_replace,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_method_info_create_item_OUT_ARG_pointers[] =
{
  &__secret_gen_collection_method_info_create_item_OUT_ARG_item,
  &__secret_gen_collection_method_info_create_item_OUT_ARG_prompt,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_collection_method_info_create_item =
{
  {
    -1,
    (gchar *) "CreateItem",
    (GDBusArgInfo **) &__secret_gen_collection_method_info_create_item_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_collection_method_info_create_item_OUT_ARG_pointers,
    NULL
  },
  "handle-create-item",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const __secret_gen_collection_method_info_pointers[] =
{
  &__secret_gen_collection_method_info_delete,
  &__secret_gen_collection_method_info_search_items,
  &__secret_gen_collection_method_info_create_item,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_signal_info_item_created_ARG_pointers[] =
{
  &__secret_gen_collection_signal_info_item_created_ARG_item,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_signal_info_item_deleted_ARG_pointers[] =
{
  &__secret_gen_collection_signal_info_item_deleted_ARG_item,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_collection_signal_info_item_changed_ARG_pointers[] =
{
  &__secret_gen_collection_signal_info_item_changed_ARG_item,
  NULL
};

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

static const _ExtendedGDBusSignalInfo * const __secret_gen_collection_signal_info_pointers[] =
{
  &__secret_gen_collection_signal_info_item_created,
  &__secret_gen_collection_signal_info_item_deleted,
  &__secret_gen_collection_signal_info_item_changed,
  NULL
};

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

static const _ExtendedGDBusPropertyInfo __secret_gen_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 __secret_gen_collection_property_info_locked =
{
  {
    -1,
    (gchar *) "Locked",
    (gchar *) "b",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "locked",
  FALSE
};

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

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

static const _ExtendedGDBusPropertyInfo * const __secret_gen_collection_property_info_pointers[] =
{
  &__secret_gen_collection_property_info_items,
  &__secret_gen_collection_property_info_label,
  &__secret_gen_collection_property_info_locked,
  &__secret_gen_collection_property_info_created,
  &__secret_gen_collection_property_info_modified,
  NULL
};

static const _ExtendedGDBusInterfaceInfo __secret_gen_collection_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Collection",
    (GDBusMethodInfo **) &__secret_gen_collection_method_info_pointers,
    (GDBusSignalInfo **) &__secret_gen_collection_signal_info_pointers,
    (GDBusPropertyInfo **) &__secret_gen_collection_property_info_pointers,
    NULL
  },
  "collection",
};


/**
 * _secret_gen_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 *
_secret_gen_collection_interface_info (void)
{
  return (GDBusInterfaceInfo *) &__secret_gen_collection_interface_info;
}

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



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

/**
 * SecretGenCollectionIface:
 * @parent_iface: The parent interface.
 * @handle_create_item: Handler for the #SecretGenCollection::handle-create-item signal.
 * @handle_delete: Handler for the #SecretGenCollection::handle-delete signal.
 * @handle_search_items: Handler for the #SecretGenCollection::handle-search-items signal.
 * @get_created: Getter for the #SecretGenCollection:created property.
 * @get_items: Getter for the #SecretGenCollection:items property.
 * @get_label: Getter for the #SecretGenCollection:label property.
 * @get_locked: Getter for the #SecretGenCollection:locked property.
 * @get_modified: Getter for the #SecretGenCollection:modified property.
 * @item_changed: Handler for the #SecretGenCollection::item-changed signal.
 * @item_created: Handler for the #SecretGenCollection::item-created signal.
 * @item_deleted: Handler for the #SecretGenCollection::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>.
 */

static void
_secret_gen_collection_default_init (SecretGenCollectionIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * SecretGenCollection::handle-delete:
   * @object: A #SecretGenCollection.
   * @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 _secret_gen_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 (SecretGenCollectionIface, handle_delete),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * SecretGenCollection::handle-search-items:
   * @object: A #SecretGenCollection.
   * @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 _secret_gen_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 (SecretGenCollectionIface, 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);

  /**
   * SecretGenCollection::handle-create-item:
   * @object: A #SecretGenCollection.
   * @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 _secret_gen_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 (SecretGenCollectionIface, 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: */
  /**
   * SecretGenCollection::item-created:
   * @object: A #SecretGenCollection.
   * @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 (SecretGenCollectionIface, item_created),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * SecretGenCollection::item-deleted:
   * @object: A #SecretGenCollection.
   * @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 (SecretGenCollectionIface, item_deleted),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /**
   * SecretGenCollection::item-changed:
   * @object: A #SecretGenCollection.
   * @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 (SecretGenCollectionIface, item_changed),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRING);

  /* GObject properties for D-Bus properties: */
  /**
   * SecretGenCollection: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));
  /**
   * SecretGenCollection: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));
  /**
   * SecretGenCollection: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));
  /**
   * SecretGenCollection: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));
  /**
   * SecretGenCollection: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));
}

typedef SecretGenCollectionIface SecretGenCollectionInterface;
G_DEFINE_INTERFACE (SecretGenCollection, _secret_gen_collection, G_TYPE_OBJECT);

/**
 * _secret_gen_collection_get_items: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 _secret_gen_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 *
_secret_gen_collection_get_items (SecretGenCollection *object)
{
  return SECRET_GEN_COLLECTION_GET_IFACE (object)->get_items (object);
}

/**
 * _secret_gen_collection_dup_items: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 **
_secret_gen_collection_dup_items (SecretGenCollection *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "items", &value, NULL);
  return value;
}

/**
 * _secret_gen_collection_set_items: (skip)
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_set_items (SecretGenCollection *object, const gchar *const *value)
{
  g_object_set (G_OBJECT (object), "items", value, NULL);
}

/**
 * _secret_gen_collection_get_label: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 _secret_gen_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 *
_secret_gen_collection_get_label (SecretGenCollection *object)
{
  return SECRET_GEN_COLLECTION_GET_IFACE (object)->get_label (object);
}

/**
 * _secret_gen_collection_dup_label: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 *
_secret_gen_collection_dup_label (SecretGenCollection *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "label", &value, NULL);
  return value;
}

/**
 * _secret_gen_collection_set_label: (skip)
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_set_label (SecretGenCollection *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "label", value, NULL);
}

/**
 * _secret_gen_collection_get_locked: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 
_secret_gen_collection_get_locked (SecretGenCollection *object)
{
  return SECRET_GEN_COLLECTION_GET_IFACE (object)->get_locked (object);
}

/**
 * _secret_gen_collection_set_locked: (skip)
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_set_locked (SecretGenCollection *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "locked", value, NULL);
}

/**
 * _secret_gen_collection_get_created: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 
_secret_gen_collection_get_created (SecretGenCollection *object)
{
  return SECRET_GEN_COLLECTION_GET_IFACE (object)->get_created (object);
}

/**
 * _secret_gen_collection_set_created: (skip)
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_set_created (SecretGenCollection *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "created", value, NULL);
}

/**
 * _secret_gen_collection_get_modified: (skip)
 * @object: A #SecretGenCollection.
 *
 * 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 
_secret_gen_collection_get_modified (SecretGenCollection *object)
{
  return SECRET_GEN_COLLECTION_GET_IFACE (object)->get_modified (object);
}

/**
 * _secret_gen_collection_set_modified: (skip)
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_set_modified (SecretGenCollection *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "modified", value, NULL);
}

/**
 * _secret_gen_collection_emit_item_created:
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_emit_item_created (
    SecretGenCollection *object,
    const gchar *arg_item)
{
  g_signal_emit_by_name (object, "item-created", arg_item);
}

/**
 * _secret_gen_collection_emit_item_deleted:
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_emit_item_deleted (
    SecretGenCollection *object,
    const gchar *arg_item)
{
  g_signal_emit_by_name (object, "item-deleted", arg_item);
}

/**
 * _secret_gen_collection_emit_item_changed:
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_emit_item_changed (
    SecretGenCollection *object,
    const gchar *arg_item)
{
  g_signal_emit_by_name (object, "item-changed", arg_item);
}

/**
 * _secret_gen_collection_call_delete:
 * @proxy: A #SecretGenCollectionProxy.
 * @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 _secret_gen_collection_call_delete_finish() to get the result of the operation.
 *
 * See _secret_gen_collection_call_delete_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_collection_call_delete (
    SecretGenCollection *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);
}

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

/**
 * _secret_gen_collection_call_delete_sync:
 * @proxy: A #SecretGenCollectionProxy.
 * @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 _secret_gen_collection_call_delete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_collection_call_delete_sync (
    SecretGenCollection *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;
}

/**
 * _secret_gen_collection_call_search_items:
 * @proxy: A #SecretGenCollectionProxy.
 * @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 _secret_gen_collection_call_search_items_finish() to get the result of the operation.
 *
 * See _secret_gen_collection_call_search_items_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_collection_call_search_items (
    SecretGenCollection *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);
}

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

/**
 * _secret_gen_collection_call_search_items_sync:
 * @proxy: A #SecretGenCollectionProxy.
 * @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 _secret_gen_collection_call_search_items() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_collection_call_search_items_sync (
    SecretGenCollection *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;
}

/**
 * _secret_gen_collection_call_create_item:
 * @proxy: A #SecretGenCollectionProxy.
 * @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 _secret_gen_collection_call_create_item_finish() to get the result of the operation.
 *
 * See _secret_gen_collection_call_create_item_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_collection_call_create_item (
    SecretGenCollection *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);
}

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

/**
 * _secret_gen_collection_call_create_item_sync:
 * @proxy: A #SecretGenCollectionProxy.
 * @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 _secret_gen_collection_call_create_item() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_collection_call_create_item_sync (
    SecretGenCollection *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;
}

/**
 * _secret_gen_collection_complete_delete:
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_complete_delete (
    SecretGenCollection *object,
    GDBusMethodInvocation *invocation,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   prompt));
}

/**
 * _secret_gen_collection_complete_search_items:
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_complete_search_items (
    SecretGenCollection *object,
    GDBusMethodInvocation *invocation,
    const gchar *const *results)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(^ao)",
                   results));
}

/**
 * _secret_gen_collection_complete_create_item:
 * @object: A #SecretGenCollection.
 * @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
_secret_gen_collection_complete_create_item (
    SecretGenCollection *object,
    GDBusMethodInvocation *invocation,
    const gchar *item,
    const gchar *prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(oo)",
                   item,
                   prompt));
}

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

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

/**
 * SecretGenCollectionProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenCollectionProxy.
 */

struct _SecretGenCollectionProxyPrivate
{
  GData *qdata;
};

static void _secret_gen_collection_proxy_iface_init (SecretGenCollectionIface *iface);

G_DEFINE_TYPE_WITH_CODE (SecretGenCollectionProxy, _secret_gen_collection_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_COLLECTION, _secret_gen_collection_proxy_iface_init));

static void
_secret_gen_collection_proxy_finalize (GObject *object)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_COLLECTION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (_secret_gen_collection_proxy_parent_class)->finalize (object);
}

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

static void
_secret_gen_collection_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 5);
  info = __secret_gen_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) _secret_gen_collection_proxy_set_property_cb, (gpointer) info);
  g_variant_unref (variant);
}

static void
_secret_gen_collection_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name,
  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 *) &__secret_gen_collection_interface_info, 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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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
_secret_gen_collection_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_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 *) &__secret_gen_collection_interface_info, 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 *) &__secret_gen_collection_interface_info, 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 *
_secret_gen_collection_proxy_get_items (SecretGenCollection *object)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_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 *
_secret_gen_collection_proxy_get_label (SecretGenCollection *object)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_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 
_secret_gen_collection_proxy_get_locked (SecretGenCollection *object)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_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 
_secret_gen_collection_proxy_get_created (SecretGenCollection *object)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_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 
_secret_gen_collection_proxy_get_modified (SecretGenCollection *object)
{
  SecretGenCollectionProxy *proxy = SECRET_GEN_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
_secret_gen_collection_proxy_init (SecretGenCollectionProxy *proxy)
{
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, SECRET_GEN_TYPE_COLLECTION_PROXY, SecretGenCollectionProxyPrivate);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), _secret_gen_collection_interface_info ());
}

static void
_secret_gen_collection_proxy_class_init (SecretGenCollectionProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  g_type_class_add_private (klass, sizeof (SecretGenCollectionProxyPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = _secret_gen_collection_proxy_finalize;
  gobject_class->get_property = _secret_gen_collection_proxy_get_property;
  gobject_class->set_property = _secret_gen_collection_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = _secret_gen_collection_proxy_g_signal;
  proxy_class->g_properties_changed = _secret_gen_collection_proxy_g_properties_changed;


  _secret_gen_collection_override_properties (gobject_class, 1);
}

static void
_secret_gen_collection_proxy_iface_init (SecretGenCollectionIface *iface)
{
  iface->get_items = _secret_gen_collection_proxy_get_items;
  iface->get_label = _secret_gen_collection_proxy_get_label;
  iface->get_locked = _secret_gen_collection_proxy_get_locked;
  iface->get_created = _secret_gen_collection_proxy_get_created;
  iface->get_modified = _secret_gen_collection_proxy_get_modified;
}

/**
 * _secret_gen_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 _secret_gen_collection_proxy_new_finish() to get the result of the operation.
 *
 * See _secret_gen_collection_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_collection_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenCollectionProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenCollection *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_COLLECTION (ret);
  else
    return NULL;
}


/**
 * _secret_gen_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 _secret_gen_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 _secret_gen_collection_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See _secret_gen_collection_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_collection_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See _secret_gen_collection_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenCollectionProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenCollection *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_COLLECTION (ret);
  else
    return NULL;
}


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

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

/**
 * SecretGenCollectionSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenCollectionSkeleton.
 */

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

static void
__secret_gen_collection_skeleton_handle_method_call (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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 *
__secret_gen_collection_skeleton_handle_get_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_collection_interface_info, 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
__secret_gen_collection_skeleton_handle_set_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_collection_interface_info, 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 __secret_gen_collection_skeleton_vtable =
{
  __secret_gen_collection_skeleton_handle_method_call,
  __secret_gen_collection_skeleton_handle_get_property,
  __secret_gen_collection_skeleton_handle_set_property
};

static GDBusInterfaceInfo *
_secret_gen_collection_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
{
  return _secret_gen_collection_interface_info ();
}

static GDBusInterfaceVTable *
_secret_gen_collection_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
{
  return (GDBusInterfaceVTable *) &__secret_gen_collection_skeleton_vtable;
}

static GVariant *
_secret_gen_collection_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_COLLECTION_SKELETON (_skeleton);

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

static void
_secret_gen_collection_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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)
    __secret_gen_collection_emit_changed (skeleton);
}

static void
__secret_gen_collection_on_signal_item_created (
    SecretGenCollection *object,
    const gchar *arg_item)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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
__secret_gen_collection_on_signal_item_deleted (
    SecretGenCollection *object,
    const gchar *arg_item)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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
__secret_gen_collection_on_signal_item_changed (
    SecretGenCollection *object,
    const gchar *arg_item)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 _secret_gen_collection_skeleton_iface_init (SecretGenCollectionIface *iface);
G_DEFINE_TYPE_WITH_CODE (SecretGenCollectionSkeleton, _secret_gen_collection_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_COLLECTION, _secret_gen_collection_skeleton_iface_init));

static void
_secret_gen_collection_skeleton_finalize (GObject *object)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 (_secret_gen_collection_skeleton_parent_class)->finalize (object);
}

static void
_secret_gen_collection_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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
__secret_gen_collection_emit_changed (gpointer user_data)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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, *l;
      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 (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.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
__secret_gen_collection_schedule_emit_changed (SecretGenCollectionSkeleton *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
_secret_gen_collection_skeleton_notify (GObject      *object,
  GParamSpec *pspec)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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, __secret_gen_collection_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
_secret_gen_collection_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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)
        __secret_gen_collection_schedule_emit_changed (skeleton, __secret_gen_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
_secret_gen_collection_skeleton_init (SecretGenCollectionSkeleton *skeleton)
{
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, SECRET_GEN_TYPE_COLLECTION_SKELETON, SecretGenCollectionSkeletonPrivate);
  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 *
_secret_gen_collection_skeleton_get_items (SecretGenCollection *object)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 *
_secret_gen_collection_skeleton_get_label (SecretGenCollection *object)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 
_secret_gen_collection_skeleton_get_locked (SecretGenCollection *object)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 
_secret_gen_collection_skeleton_get_created (SecretGenCollection *object)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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 
_secret_gen_collection_skeleton_get_modified (SecretGenCollection *object)
{
  SecretGenCollectionSkeleton *skeleton = SECRET_GEN_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
_secret_gen_collection_skeleton_class_init (SecretGenCollectionSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  g_type_class_add_private (klass, sizeof (SecretGenCollectionSkeletonPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = _secret_gen_collection_skeleton_finalize;
  gobject_class->get_property = _secret_gen_collection_skeleton_get_property;
  gobject_class->set_property = _secret_gen_collection_skeleton_set_property;
  gobject_class->notify       = _secret_gen_collection_skeleton_notify;


  _secret_gen_collection_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = _secret_gen_collection_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = _secret_gen_collection_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = _secret_gen_collection_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = _secret_gen_collection_skeleton_dbus_interface_get_vtable;
}

static void
_secret_gen_collection_skeleton_iface_init (SecretGenCollectionIface *iface)
{
  iface->item_created = __secret_gen_collection_on_signal_item_created;
  iface->item_deleted = __secret_gen_collection_on_signal_item_deleted;
  iface->item_changed = __secret_gen_collection_on_signal_item_changed;
  iface->get_items = _secret_gen_collection_skeleton_get_items;
  iface->get_label = _secret_gen_collection_skeleton_get_label;
  iface->get_locked = _secret_gen_collection_skeleton_get_locked;
  iface->get_created = _secret_gen_collection_skeleton_get_created;
  iface->get_modified = _secret_gen_collection_skeleton_get_modified;
}

/**
 * _secret_gen_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 SecretGenCollectionSkeleton): The skeleton object.
 */
SecretGenCollection *
_secret_gen_collection_skeleton_new (void)
{
  return SECRET_GEN_COLLECTION (g_object_new (SECRET_GEN_TYPE_COLLECTION_SKELETON, NULL));
}

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

/**
 * SECTION:SecretGenItem
 * @title: SecretGenItem
 * @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 __secret_gen_item_method_info_delete_OUT_ARG_Prompt =
{
  {
    -1,
    (gchar *) "Prompt",
    (gchar *) "o",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const __secret_gen_item_method_info_delete_OUT_ARG_pointers[] =
{
  &__secret_gen_item_method_info_delete_OUT_ARG_Prompt,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_item_method_info_get_secret_IN_ARG_pointers[] =
{
  &__secret_gen_item_method_info_get_secret_IN_ARG_session,
  NULL
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_item_method_info_get_secret_OUT_ARG_pointers[] =
{
  &__secret_gen_item_method_info_get_secret_OUT_ARG_secret,
  NULL
};

static const _ExtendedGDBusMethodInfo __secret_gen_item_method_info_get_secret =
{
  {
    -1,
    (gchar *) "GetSecret",
    (GDBusArgInfo **) &__secret_gen_item_method_info_get_secret_IN_ARG_pointers,
    (GDBusArgInfo **) &__secret_gen_item_method_info_get_secret_OUT_ARG_pointers,
    NULL
  },
  "handle-get-secret",
  FALSE
};

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

static const _ExtendedGDBusArgInfo * const __secret_gen_item_method_info_set_secret_IN_ARG_pointers[] =
{
  &__secret_gen_item_method_info_set_secret_IN_ARG_secret,
  NULL
};

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

static const _ExtendedGDBusMethodInfo * const __secret_gen_item_method_info_pointers[] =
{
  &__secret_gen_item_method_info_delete,
  &__secret_gen_item_method_info_get_secret,
  &__secret_gen_item_method_info_set_secret,
  NULL
};

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

static const _ExtendedGDBusPropertyInfo __secret_gen_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 __secret_gen_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 __secret_gen_item_property_info_created =
{
  {
    -1,
    (gchar *) "Created",
    (gchar *) "t",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "created",
  FALSE
};

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

static const _ExtendedGDBusPropertyInfo * const __secret_gen_item_property_info_pointers[] =
{
  &__secret_gen_item_property_info_locked,
  &__secret_gen_item_property_info_attributes,
  &__secret_gen_item_property_info_label,
  &__secret_gen_item_property_info_created,
  &__secret_gen_item_property_info_modified,
  NULL
};

static const _ExtendedGDBusInterfaceInfo __secret_gen_item_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Item",
    (GDBusMethodInfo **) &__secret_gen_item_method_info_pointers,
    NULL,
    (GDBusPropertyInfo **) &__secret_gen_item_property_info_pointers,
    NULL
  },
  "item",
};


/**
 * _secret_gen_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 *
_secret_gen_item_interface_info (void)
{
  return (GDBusInterfaceInfo *) &__secret_gen_item_interface_info;
}

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



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

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

static void
_secret_gen_item_default_init (SecretGenItemIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * SecretGenItem::handle-delete:
   * @object: A #SecretGenItem.
   * @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 _secret_gen_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 (SecretGenItemIface, handle_delete),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * SecretGenItem::handle-get-secret:
   * @object: A #SecretGenItem.
   * @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 _secret_gen_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 (SecretGenItemIface, 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);

  /**
   * SecretGenItem::handle-set-secret:
   * @object: A #SecretGenItem.
   * @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 _secret_gen_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 (SecretGenItemIface, 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: */
  /**
   * SecretGenItem: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));
  /**
   * SecretGenItem: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));
  /**
   * SecretGenItem: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));
  /**
   * SecretGenItem: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));
  /**
   * SecretGenItem: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));
}

typedef SecretGenItemIface SecretGenItemInterface;
G_DEFINE_INTERFACE (SecretGenItem, _secret_gen_item, G_TYPE_OBJECT);

/**
 * _secret_gen_item_get_locked: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 
_secret_gen_item_get_locked (SecretGenItem *object)
{
  return SECRET_GEN_ITEM_GET_IFACE (object)->get_locked (object);
}

/**
 * _secret_gen_item_set_locked: (skip)
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_set_locked (SecretGenItem *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "locked", value, NULL);
}

/**
 * _secret_gen_item_get_attributes: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 _secret_gen_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 *
_secret_gen_item_get_attributes (SecretGenItem *object)
{
  return SECRET_GEN_ITEM_GET_IFACE (object)->get_attributes (object);
}

/**
 * _secret_gen_item_dup_attributes: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 *
_secret_gen_item_dup_attributes (SecretGenItem *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "attributes", &value, NULL);
  return value;
}

/**
 * _secret_gen_item_set_attributes: (skip)
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_set_attributes (SecretGenItem *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "attributes", value, NULL);
}

/**
 * _secret_gen_item_get_label: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 _secret_gen_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 *
_secret_gen_item_get_label (SecretGenItem *object)
{
  return SECRET_GEN_ITEM_GET_IFACE (object)->get_label (object);
}

/**
 * _secret_gen_item_dup_label: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 *
_secret_gen_item_dup_label (SecretGenItem *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "label", &value, NULL);
  return value;
}

/**
 * _secret_gen_item_set_label: (skip)
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_set_label (SecretGenItem *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "label", value, NULL);
}

/**
 * _secret_gen_item_get_created: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 
_secret_gen_item_get_created (SecretGenItem *object)
{
  return SECRET_GEN_ITEM_GET_IFACE (object)->get_created (object);
}

/**
 * _secret_gen_item_set_created: (skip)
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_set_created (SecretGenItem *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "created", value, NULL);
}

/**
 * _secret_gen_item_get_modified: (skip)
 * @object: A #SecretGenItem.
 *
 * 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 
_secret_gen_item_get_modified (SecretGenItem *object)
{
  return SECRET_GEN_ITEM_GET_IFACE (object)->get_modified (object);
}

/**
 * _secret_gen_item_set_modified: (skip)
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_set_modified (SecretGenItem *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "modified", value, NULL);
}

/**
 * _secret_gen_item_call_delete:
 * @proxy: A #SecretGenItemProxy.
 * @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 _secret_gen_item_call_delete_finish() to get the result of the operation.
 *
 * See _secret_gen_item_call_delete_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_item_call_delete (
    SecretGenItem *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);
}

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

/**
 * _secret_gen_item_call_delete_sync:
 * @proxy: A #SecretGenItemProxy.
 * @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 _secret_gen_item_call_delete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_item_call_delete_sync (
    SecretGenItem *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;
}

/**
 * _secret_gen_item_call_get_secret:
 * @proxy: A #SecretGenItemProxy.
 * @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 _secret_gen_item_call_get_secret_finish() to get the result of the operation.
 *
 * See _secret_gen_item_call_get_secret_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_item_call_get_secret (
    SecretGenItem *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);
}

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

/**
 * _secret_gen_item_call_get_secret_sync:
 * @proxy: A #SecretGenItemProxy.
 * @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 _secret_gen_item_call_get_secret() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_item_call_get_secret_sync (
    SecretGenItem *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;
}

/**
 * _secret_gen_item_call_set_secret:
 * @proxy: A #SecretGenItemProxy.
 * @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 _secret_gen_item_call_set_secret_finish() to get the result of the operation.
 *
 * See _secret_gen_item_call_set_secret_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_item_call_set_secret (
    SecretGenItem *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);
}

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

/**
 * _secret_gen_item_call_set_secret_sync:
 * @proxy: A #SecretGenItemProxy.
 * @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 _secret_gen_item_call_set_secret() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_item_call_set_secret_sync (
    SecretGenItem *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;
}

/**
 * _secret_gen_item_complete_delete:
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_complete_delete (
    SecretGenItem *object,
    GDBusMethodInvocation *invocation,
    const gchar *Prompt)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(o)",
                   Prompt));
}

/**
 * _secret_gen_item_complete_get_secret:
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_complete_get_secret (
    SecretGenItem *object,
    GDBusMethodInvocation *invocation,
    GVariant *secret)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(@(oayays))",
                   secret));
}

/**
 * _secret_gen_item_complete_set_secret:
 * @object: A #SecretGenItem.
 * @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
_secret_gen_item_complete_set_secret (
    SecretGenItem *object,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * SecretGenItemProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenItemProxy.
 */

struct _SecretGenItemProxyPrivate
{
  GData *qdata;
};

static void _secret_gen_item_proxy_iface_init (SecretGenItemIface *iface);

G_DEFINE_TYPE_WITH_CODE (SecretGenItemProxy, _secret_gen_item_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_ITEM, _secret_gen_item_proxy_iface_init));

static void
_secret_gen_item_proxy_finalize (GObject *object)
{
  SecretGenItemProxy *proxy = SECRET_GEN_ITEM_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (_secret_gen_item_proxy_parent_class)->finalize (object);
}

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

static void
_secret_gen_item_proxy_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  GVariant *variant;
  g_assert (prop_id != 0 && prop_id - 1 < 5);
  info = __secret_gen_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) _secret_gen_item_proxy_set_property_cb, (gpointer) info);
  g_variant_unref (variant);
}

static void
_secret_gen_item_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name,
  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 *) &__secret_gen_item_interface_info, 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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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
_secret_gen_item_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  SecretGenItemProxy *proxy = SECRET_GEN_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 *) &__secret_gen_item_interface_info, 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 *) &__secret_gen_item_interface_info, 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 
_secret_gen_item_proxy_get_locked (SecretGenItem *object)
{
  SecretGenItemProxy *proxy = SECRET_GEN_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 *
_secret_gen_item_proxy_get_attributes (SecretGenItem *object)
{
  SecretGenItemProxy *proxy = SECRET_GEN_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 *
_secret_gen_item_proxy_get_label (SecretGenItem *object)
{
  SecretGenItemProxy *proxy = SECRET_GEN_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 guint64 
_secret_gen_item_proxy_get_created (SecretGenItem *object)
{
  SecretGenItemProxy *proxy = SECRET_GEN_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 
_secret_gen_item_proxy_get_modified (SecretGenItem *object)
{
  SecretGenItemProxy *proxy = SECRET_GEN_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
_secret_gen_item_proxy_init (SecretGenItemProxy *proxy)
{
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, SECRET_GEN_TYPE_ITEM_PROXY, SecretGenItemProxyPrivate);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), _secret_gen_item_interface_info ());
}

static void
_secret_gen_item_proxy_class_init (SecretGenItemProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  g_type_class_add_private (klass, sizeof (SecretGenItemProxyPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = _secret_gen_item_proxy_finalize;
  gobject_class->get_property = _secret_gen_item_proxy_get_property;
  gobject_class->set_property = _secret_gen_item_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = _secret_gen_item_proxy_g_signal;
  proxy_class->g_properties_changed = _secret_gen_item_proxy_g_properties_changed;


  _secret_gen_item_override_properties (gobject_class, 1);
}

static void
_secret_gen_item_proxy_iface_init (SecretGenItemIface *iface)
{
  iface->get_locked = _secret_gen_item_proxy_get_locked;
  iface->get_attributes = _secret_gen_item_proxy_get_attributes;
  iface->get_label = _secret_gen_item_proxy_get_label;
  iface->get_created = _secret_gen_item_proxy_get_created;
  iface->get_modified = _secret_gen_item_proxy_get_modified;
}

/**
 * _secret_gen_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 _secret_gen_item_proxy_new_finish() to get the result of the operation.
 *
 * See _secret_gen_item_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_item_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenItemProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenItem *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_ITEM (ret);
  else
    return NULL;
}


/**
 * _secret_gen_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 _secret_gen_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 _secret_gen_item_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See _secret_gen_item_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_item_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See _secret_gen_item_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenItemProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenItem *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_ITEM (ret);
  else
    return NULL;
}


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

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

/**
 * SecretGenItemSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenItemSkeleton.
 */

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

static void
__secret_gen_item_skeleton_handle_method_call (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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 *
__secret_gen_item_skeleton_handle_get_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_item_interface_info, 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
__secret_gen_item_skeleton_handle_set_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_item_interface_info, 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 __secret_gen_item_skeleton_vtable =
{
  __secret_gen_item_skeleton_handle_method_call,
  __secret_gen_item_skeleton_handle_get_property,
  __secret_gen_item_skeleton_handle_set_property
};

static GDBusInterfaceInfo *
_secret_gen_item_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
{
  return _secret_gen_item_interface_info ();
}

static GDBusInterfaceVTable *
_secret_gen_item_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
{
  return (GDBusInterfaceVTable *) &__secret_gen_item_skeleton_vtable;
}

static GVariant *
_secret_gen_item_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_ITEM_SKELETON (_skeleton);

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

static void
_secret_gen_item_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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)
    __secret_gen_item_emit_changed (skeleton);
}

static void _secret_gen_item_skeleton_iface_init (SecretGenItemIface *iface);
G_DEFINE_TYPE_WITH_CODE (SecretGenItemSkeleton, _secret_gen_item_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_ITEM, _secret_gen_item_skeleton_iface_init));

static void
_secret_gen_item_skeleton_finalize (GObject *object)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_ITEM_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 (_secret_gen_item_skeleton_parent_class)->finalize (object);
}

static void
_secret_gen_item_skeleton_get_property (GObject      *object,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_ITEM_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
__secret_gen_item_emit_changed (gpointer user_data)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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, *l;
      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 (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.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
__secret_gen_item_schedule_emit_changed (SecretGenItemSkeleton *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
_secret_gen_item_skeleton_notify (GObject      *object,
  GParamSpec *pspec)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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, __secret_gen_item_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
_secret_gen_item_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_ITEM_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)
        __secret_gen_item_schedule_emit_changed (skeleton, __secret_gen_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
_secret_gen_item_skeleton_init (SecretGenItemSkeleton *skeleton)
{
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, SECRET_GEN_TYPE_ITEM_SKELETON, SecretGenItemSkeletonPrivate);
  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
  skeleton->priv->properties = g_new0 (GValue, 5);
  g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN);
  g_value_init (&skeleton->priv->properties[1], G_TYPE_VARIANT);
  g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
  g_value_init (&skeleton->priv->properties[3], G_TYPE_UINT64);
  g_value_init (&skeleton->priv->properties[4], G_TYPE_UINT64);
}

static gboolean 
_secret_gen_item_skeleton_get_locked (SecretGenItem *object)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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 *
_secret_gen_item_skeleton_get_attributes (SecretGenItem *object)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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 *
_secret_gen_item_skeleton_get_label (SecretGenItem *object)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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 guint64 
_secret_gen_item_skeleton_get_created (SecretGenItem *object)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_ITEM_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 
_secret_gen_item_skeleton_get_modified (SecretGenItem *object)
{
  SecretGenItemSkeleton *skeleton = SECRET_GEN_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 void
_secret_gen_item_skeleton_class_init (SecretGenItemSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  g_type_class_add_private (klass, sizeof (SecretGenItemSkeletonPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = _secret_gen_item_skeleton_finalize;
  gobject_class->get_property = _secret_gen_item_skeleton_get_property;
  gobject_class->set_property = _secret_gen_item_skeleton_set_property;
  gobject_class->notify       = _secret_gen_item_skeleton_notify;


  _secret_gen_item_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = _secret_gen_item_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = _secret_gen_item_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = _secret_gen_item_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = _secret_gen_item_skeleton_dbus_interface_get_vtable;
}

static void
_secret_gen_item_skeleton_iface_init (SecretGenItemIface *iface)
{
  iface->get_locked = _secret_gen_item_skeleton_get_locked;
  iface->get_attributes = _secret_gen_item_skeleton_get_attributes;
  iface->get_label = _secret_gen_item_skeleton_get_label;
  iface->get_created = _secret_gen_item_skeleton_get_created;
  iface->get_modified = _secret_gen_item_skeleton_get_modified;
}

/**
 * _secret_gen_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 SecretGenItemSkeleton): The skeleton object.
 */
SecretGenItem *
_secret_gen_item_skeleton_new (void)
{
  return SECRET_GEN_ITEM (g_object_new (SECRET_GEN_TYPE_ITEM_SKELETON, NULL));
}

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

/**
 * SECTION:SecretGenSession
 * @title: SecretGenSession
 * @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 __secret_gen_session_method_info_close =
{
  {
    -1,
    (gchar *) "Close",
    NULL,
    NULL,
    NULL
  },
  "handle-close",
  FALSE
};

static const _ExtendedGDBusMethodInfo * const __secret_gen_session_method_info_pointers[] =
{
  &__secret_gen_session_method_info_close,
  NULL
};

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


/**
 * _secret_gen_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 *
_secret_gen_session_interface_info (void)
{
  return (GDBusInterfaceInfo *) &__secret_gen_session_interface_info;
}

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



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

/**
 * SecretGenSessionIface:
 * @parent_iface: The parent interface.
 * @handle_close: Handler for the #SecretGenSession::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>.
 */

static void
_secret_gen_session_default_init (SecretGenSessionIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * SecretGenSession::handle-close:
   * @object: A #SecretGenSession.
   * @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 _secret_gen_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 (SecretGenSessionIface, handle_close),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

}

typedef SecretGenSessionIface SecretGenSessionInterface;
G_DEFINE_INTERFACE (SecretGenSession, _secret_gen_session, G_TYPE_OBJECT);

/**
 * _secret_gen_session_call_close:
 * @proxy: A #SecretGenSessionProxy.
 * @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 _secret_gen_session_call_close_finish() to get the result of the operation.
 *
 * See _secret_gen_session_call_close_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_session_call_close (
    SecretGenSession *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);
}

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

/**
 * _secret_gen_session_call_close_sync:
 * @proxy: A #SecretGenSessionProxy.
 * @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 _secret_gen_session_call_close() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_session_call_close_sync (
    SecretGenSession *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;
}

/**
 * _secret_gen_session_complete_close:
 * @object: A #SecretGenSession.
 * @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
_secret_gen_session_complete_close (
    SecretGenSession *object,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * SecretGenSessionProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenSessionProxy.
 */

struct _SecretGenSessionProxyPrivate
{
  GData *qdata;
};

static void _secret_gen_session_proxy_iface_init (SecretGenSessionIface *iface);

G_DEFINE_TYPE_WITH_CODE (SecretGenSessionProxy, _secret_gen_session_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_SESSION, _secret_gen_session_proxy_iface_init));

static void
_secret_gen_session_proxy_finalize (GObject *object)
{
  SecretGenSessionProxy *proxy = SECRET_GEN_SESSION_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (_secret_gen_session_proxy_parent_class)->finalize (object);
}

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

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

static void
_secret_gen_session_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name,
  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 *) &__secret_gen_session_interface_info, 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], SECRET_GEN_TYPE_SESSION);
  g_value_set_object (&paramv[0], proxy);
  g_variant_iter_init (&iter, parameters);
  n = 1;
  while ((child = g_variant_iter_next_value (&iter)) != NULL)
    {
      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
      if (arg_info->use_gvariant)
        {
          g_value_init (&paramv[n], G_TYPE_VARIANT);
          g_value_set_variant (&paramv[n], child);
          n++;
        }
      else
        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
      g_variant_unref (child);
    }
  signal_id = g_signal_lookup (info->signal_name, SECRET_GEN_TYPE_SESSION);
  g_signal_emitv (paramv, signal_id, 0, NULL);
  for (n = 0; n < num_params + 1; n++)
    g_value_unset (&paramv[n]);
  g_free (paramv);
}

static void
_secret_gen_session_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  SecretGenSessionProxy *proxy = SECRET_GEN_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 *) &__secret_gen_session_interface_info, 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 *) &__secret_gen_session_interface_info, 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
_secret_gen_session_proxy_init (SecretGenSessionProxy *proxy)
{
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, SECRET_GEN_TYPE_SESSION_PROXY, SecretGenSessionProxyPrivate);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), _secret_gen_session_interface_info ());
}

static void
_secret_gen_session_proxy_class_init (SecretGenSessionProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  g_type_class_add_private (klass, sizeof (SecretGenSessionProxyPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = _secret_gen_session_proxy_finalize;
  gobject_class->get_property = _secret_gen_session_proxy_get_property;
  gobject_class->set_property = _secret_gen_session_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = _secret_gen_session_proxy_g_signal;
  proxy_class->g_properties_changed = _secret_gen_session_proxy_g_properties_changed;

}

static void
_secret_gen_session_proxy_iface_init (SecretGenSessionIface *iface)
{
}

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

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

/**
 * _secret_gen_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 _secret_gen_session_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenSessionProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenSession *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_SESSION (ret);
  else
    return NULL;
}


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

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

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


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

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

/**
 * SecretGenSessionSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenSessionSkeleton.
 */

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

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

static GVariant *
__secret_gen_session_skeleton_handle_get_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  SecretGenSessionSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_session_interface_info, 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
__secret_gen_session_skeleton_handle_set_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  SecretGenSessionSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_session_interface_info, 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 __secret_gen_session_skeleton_vtable =
{
  __secret_gen_session_skeleton_handle_method_call,
  __secret_gen_session_skeleton_handle_get_property,
  __secret_gen_session_skeleton_handle_set_property
};

static GDBusInterfaceInfo *
_secret_gen_session_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
{
  return _secret_gen_session_interface_info ();
}

static GDBusInterfaceVTable *
_secret_gen_session_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
{
  return (GDBusInterfaceVTable *) &__secret_gen_session_skeleton_vtable;
}

static GVariant *
_secret_gen_session_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenSessionSkeleton *skeleton = SECRET_GEN_SESSION_SKELETON (_skeleton);

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

static void _secret_gen_session_skeleton_iface_init (SecretGenSessionIface *iface);
G_DEFINE_TYPE_WITH_CODE (SecretGenSessionSkeleton, _secret_gen_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_SESSION, _secret_gen_session_skeleton_iface_init));

static void
_secret_gen_session_skeleton_finalize (GObject *object)
{
  SecretGenSessionSkeleton *skeleton = SECRET_GEN_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 (_secret_gen_session_skeleton_parent_class)->finalize (object);
}

static void
_secret_gen_session_skeleton_init (SecretGenSessionSkeleton *skeleton)
{
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, SECRET_GEN_TYPE_SESSION_SKELETON, SecretGenSessionSkeletonPrivate);
  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
_secret_gen_session_skeleton_class_init (SecretGenSessionSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  g_type_class_add_private (klass, sizeof (SecretGenSessionSkeletonPrivate));

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = _secret_gen_session_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = _secret_gen_session_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = _secret_gen_session_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = _secret_gen_session_skeleton_dbus_interface_get_vtable;
}

static void
_secret_gen_session_skeleton_iface_init (SecretGenSessionIface *iface)
{
}

/**
 * _secret_gen_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 SecretGenSessionSkeleton): The skeleton object.
 */
SecretGenSession *
_secret_gen_session_skeleton_new (void)
{
  return SECRET_GEN_SESSION (g_object_new (SECRET_GEN_TYPE_SESSION_SKELETON, NULL));
}

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

/**
 * SECTION:SecretGenPrompt
 * @title: SecretGenPrompt
 * @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 __secret_gen_prompt_method_info_prompt_IN_ARG_window_id =
{
  {
    -1,
    (gchar *) "window_id",
    (gchar *) "s",
    NULL
  },
  FALSE
};

static const _ExtendedGDBusArgInfo * const __secret_gen_prompt_method_info_prompt_IN_ARG_pointers[] =
{
  &__secret_gen_prompt_method_info_prompt_IN_ARG_window_id,
  NULL
};

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

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

static const _ExtendedGDBusMethodInfo * const __secret_gen_prompt_method_info_pointers[] =
{
  &__secret_gen_prompt_method_info_prompt,
  &__secret_gen_prompt_method_info_dismiss,
  NULL
};

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

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

static const _ExtendedGDBusArgInfo * const __secret_gen_prompt_signal_info_completed_ARG_pointers[] =
{
  &__secret_gen_prompt_signal_info_completed_ARG_dismissed,
  &__secret_gen_prompt_signal_info_completed_ARG_result,
  NULL
};

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

static const _ExtendedGDBusSignalInfo * const __secret_gen_prompt_signal_info_pointers[] =
{
  &__secret_gen_prompt_signal_info_completed,
  NULL
};

static const _ExtendedGDBusInterfaceInfo __secret_gen_prompt_interface_info =
{
  {
    -1,
    (gchar *) "org.freedesktop.Secret.Prompt",
    (GDBusMethodInfo **) &__secret_gen_prompt_method_info_pointers,
    (GDBusSignalInfo **) &__secret_gen_prompt_signal_info_pointers,
    NULL,
    NULL
  },
  "prompt",
};


/**
 * _secret_gen_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 *
_secret_gen_prompt_interface_info (void)
{
  return (GDBusInterfaceInfo *) &__secret_gen_prompt_interface_info;
}

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



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

/**
 * SecretGenPromptIface:
 * @parent_iface: The parent interface.
 * @handle_dismiss: Handler for the #SecretGenPrompt::handle-dismiss signal.
 * @handle_prompt: Handler for the #SecretGenPrompt::handle-prompt signal.
 * @completed: Handler for the #SecretGenPrompt::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>.
 */

static void
_secret_gen_prompt_default_init (SecretGenPromptIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * SecretGenPrompt::handle-prompt:
   * @object: A #SecretGenPrompt.
   * @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 _secret_gen_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 (SecretGenPromptIface, handle_prompt),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

  /**
   * SecretGenPrompt::handle-dismiss:
   * @object: A #SecretGenPrompt.
   * @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 _secret_gen_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 (SecretGenPromptIface, 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: */
  /**
   * SecretGenPrompt::completed:
   * @object: A #SecretGenPrompt.
   * @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 (SecretGenPromptIface, completed),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    2, G_TYPE_BOOLEAN, G_TYPE_VARIANT);

}

typedef SecretGenPromptIface SecretGenPromptInterface;
G_DEFINE_INTERFACE (SecretGenPrompt, _secret_gen_prompt, G_TYPE_OBJECT);

/**
 * _secret_gen_prompt_emit_completed:
 * @object: A #SecretGenPrompt.
 * @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
_secret_gen_prompt_emit_completed (
    SecretGenPrompt *object,
    gboolean arg_dismissed,
    GVariant *arg_result)
{
  g_signal_emit_by_name (object, "completed", arg_dismissed, arg_result);
}

/**
 * _secret_gen_prompt_call_prompt:
 * @proxy: A #SecretGenPromptProxy.
 * @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 _secret_gen_prompt_call_prompt_finish() to get the result of the operation.
 *
 * See _secret_gen_prompt_call_prompt_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_prompt_call_prompt (
    SecretGenPrompt *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);
}

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

/**
 * _secret_gen_prompt_call_prompt_sync:
 * @proxy: A #SecretGenPromptProxy.
 * @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 _secret_gen_prompt_call_prompt() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_prompt_call_prompt_sync (
    SecretGenPrompt *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;
}

/**
 * _secret_gen_prompt_call_dismiss:
 * @proxy: A #SecretGenPromptProxy.
 * @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 _secret_gen_prompt_call_dismiss_finish() to get the result of the operation.
 *
 * See _secret_gen_prompt_call_dismiss_sync() for the synchronous, blocking version of this method.
 */
void
_secret_gen_prompt_call_dismiss (
    SecretGenPrompt *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);
}

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

/**
 * _secret_gen_prompt_call_dismiss_sync:
 * @proxy: A #SecretGenPromptProxy.
 * @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 _secret_gen_prompt_call_dismiss() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 */
gboolean
_secret_gen_prompt_call_dismiss_sync (
    SecretGenPrompt *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;
}

/**
 * _secret_gen_prompt_complete_prompt:
 * @object: A #SecretGenPrompt.
 * @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
_secret_gen_prompt_complete_prompt (
    SecretGenPrompt *object,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * _secret_gen_prompt_complete_dismiss:
 * @object: A #SecretGenPrompt.
 * @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
_secret_gen_prompt_complete_dismiss (
    SecretGenPrompt *object,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * SecretGenPromptProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenPromptProxy.
 */

struct _SecretGenPromptProxyPrivate
{
  GData *qdata;
};

static void _secret_gen_prompt_proxy_iface_init (SecretGenPromptIface *iface);

G_DEFINE_TYPE_WITH_CODE (SecretGenPromptProxy, _secret_gen_prompt_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_PROMPT, _secret_gen_prompt_proxy_iface_init));

static void
_secret_gen_prompt_proxy_finalize (GObject *object)
{
  SecretGenPromptProxy *proxy = SECRET_GEN_PROMPT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (_secret_gen_prompt_proxy_parent_class)->finalize (object);
}

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

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

static void
_secret_gen_prompt_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name,
  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 *) &__secret_gen_prompt_interface_info, 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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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
_secret_gen_prompt_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  SecretGenPromptProxy *proxy = SECRET_GEN_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 *) &__secret_gen_prompt_interface_info, 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 *) &__secret_gen_prompt_interface_info, 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
_secret_gen_prompt_proxy_init (SecretGenPromptProxy *proxy)
{
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, SECRET_GEN_TYPE_PROMPT_PROXY, SecretGenPromptProxyPrivate);
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), _secret_gen_prompt_interface_info ());
}

static void
_secret_gen_prompt_proxy_class_init (SecretGenPromptProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  g_type_class_add_private (klass, sizeof (SecretGenPromptProxyPrivate));

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = _secret_gen_prompt_proxy_finalize;
  gobject_class->get_property = _secret_gen_prompt_proxy_get_property;
  gobject_class->set_property = _secret_gen_prompt_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = _secret_gen_prompt_proxy_g_signal;
  proxy_class->g_properties_changed = _secret_gen_prompt_proxy_g_properties_changed;

}

static void
_secret_gen_prompt_proxy_iface_init (SecretGenPromptIface *iface)
{
}

/**
 * _secret_gen_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 _secret_gen_prompt_proxy_new_finish() to get the result of the operation.
 *
 * See _secret_gen_prompt_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_prompt_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenPromptProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenPrompt *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_PROMPT (ret);
  else
    return NULL;
}


/**
 * _secret_gen_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 _secret_gen_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 _secret_gen_prompt_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See _secret_gen_prompt_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
_secret_gen_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 (SECRET_GEN_TYPE_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);
}

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

/**
 * _secret_gen_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 _secret_gen_prompt_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See _secret_gen_prompt_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type SecretGenPromptProxy): The constructed proxy object or %NULL if @error is set.
 */
SecretGenPrompt *
_secret_gen_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 (SECRET_GEN_TYPE_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 SECRET_GEN_PROMPT (ret);
  else
    return NULL;
}


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

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

/**
 * SecretGenPromptSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #SecretGenPromptSkeleton.
 */

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

static void
__secret_gen_prompt_skeleton_handle_method_call (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  SecretGenPromptSkeleton *skeleton = SECRET_GEN_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], SECRET_GEN_TYPE_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, SECRET_GEN_TYPE_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 *
__secret_gen_prompt_skeleton_handle_get_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  SecretGenPromptSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_prompt_interface_info, 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
__secret_gen_prompt_skeleton_handle_set_property (
  GDBusConnection *connection,
  const gchar *sender,
  const gchar *object_path,
  const gchar *interface_name,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  SecretGenPromptSkeleton *skeleton = SECRET_GEN_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 *) &__secret_gen_prompt_interface_info, 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 __secret_gen_prompt_skeleton_vtable =
{
  __secret_gen_prompt_skeleton_handle_method_call,
  __secret_gen_prompt_skeleton_handle_get_property,
  __secret_gen_prompt_skeleton_handle_set_property
};

static GDBusInterfaceInfo *
_secret_gen_prompt_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
{
  return _secret_gen_prompt_interface_info ();
}

static GDBusInterfaceVTable *
_secret_gen_prompt_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
{
  return (GDBusInterfaceVTable *) &__secret_gen_prompt_skeleton_vtable;
}

static GVariant *
_secret_gen_prompt_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  SecretGenPromptSkeleton *skeleton = SECRET_GEN_PROMPT_SKELETON (_skeleton);

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

static void
__secret_gen_prompt_on_signal_completed (
    SecretGenPrompt *object,
    gboolean arg_dismissed,
    GVariant *arg_result)
{
  SecretGenPromptSkeleton *skeleton = SECRET_GEN_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 _secret_gen_prompt_skeleton_iface_init (SecretGenPromptIface *iface);
G_DEFINE_TYPE_WITH_CODE (SecretGenPromptSkeleton, _secret_gen_prompt_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (SECRET_GEN_TYPE_PROMPT, _secret_gen_prompt_skeleton_iface_init));

static void
_secret_gen_prompt_skeleton_finalize (GObject *object)
{
  SecretGenPromptSkeleton *skeleton = SECRET_GEN_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 (_secret_gen_prompt_skeleton_parent_class)->finalize (object);
}

static void
_secret_gen_prompt_skeleton_init (SecretGenPromptSkeleton *skeleton)
{
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, SECRET_GEN_TYPE_PROMPT_SKELETON, SecretGenPromptSkeletonPrivate);
  g_mutex_init (&skeleton->priv->lock);
  skeleton->priv->context = g_main_context_ref_thread_default ();
}

static void
_secret_gen_prompt_skeleton_class_init (SecretGenPromptSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  g_type_class_add_private (klass, sizeof (SecretGenPromptSkeletonPrivate));

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = _secret_gen_prompt_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = _secret_gen_prompt_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = _secret_gen_prompt_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = _secret_gen_prompt_skeleton_dbus_interface_get_vtable;
}

static void
_secret_gen_prompt_skeleton_iface_init (SecretGenPromptIface *iface)
{
  iface->completed = __secret_gen_prompt_on_signal_completed;
}

/**
 * _secret_gen_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 SecretGenPromptSkeleton): The skeleton object.
 */
SecretGenPrompt *
_secret_gen_prompt_skeleton_new (void)
{
  return SECRET_GEN_PROMPT (g_object_new (SECRET_GEN_TYPE_PROMPT_SKELETON, NULL));
}

