/*
 * This file is generated by gdbus-codegen, do not modify it.
 *
 * The license of this code is the same as for the D-Bus interface description
 * it was derived from. Note that it links to GLib, so must comply with the
 * LGPL linking clauses.
 */

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

#include "e-dbus-source.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;
  guint use_gvariant : 1;
  guint emits_changed_signal : 1;
} _ExtendedGDBusPropertyInfo;

typedef struct
{
  GDBusInterfaceInfo parent_struct;
  const gchar *hyphen_name;
} _ExtendedGDBusInterfaceInfo;

typedef struct
{
  const _ExtendedGDBusPropertyInfo *info;
  guint prop_id;
  GValue orig_value; /* the value before the change */
} ChangedProperty;

static void
_changed_property_free (ChangedProperty *data)
{
  g_value_unset (&data->orig_value);
  g_free (data);
}

static gboolean
_g_strv_equal0 (gchar **a, gchar **b)
{
  gboolean ret = FALSE;
  guint n;
  if (a == NULL && b == NULL)
    {
      ret = TRUE;
      goto out;
    }
  if (a == NULL || b == NULL)
    goto out;
  if (g_strv_length (a) != g_strv_length (b))
    goto out;
  for (n = 0; a[n] != NULL; n++)
    if (g_strcmp0 (a[n], b[n]) != 0)
      goto out;
  ret = TRUE;
out:
  return ret;
}

static gboolean
_g_variant_equal0 (GVariant *a, GVariant *b)
{
  gboolean ret = FALSE;
  if (a == NULL && b == NULL)
    {
      ret = TRUE;
      goto out;
    }
  if (a == NULL || b == NULL)
    goto out;
  ret = g_variant_equal (a, b);
out:
  return ret;
}

G_GNUC_UNUSED static gboolean
_g_value_equal (const GValue *a, const GValue *b)
{
  gboolean ret = FALSE;
  g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
  switch (G_VALUE_TYPE (a))
    {
      case G_TYPE_BOOLEAN:
        ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
        break;
      case G_TYPE_UCHAR:
        ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
        break;
      case G_TYPE_INT:
        ret = (g_value_get_int (a) == g_value_get_int (b));
        break;
      case G_TYPE_UINT:
        ret = (g_value_get_uint (a) == g_value_get_uint (b));
        break;
      case G_TYPE_INT64:
        ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
        break;
      case G_TYPE_UINT64:
        ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
        break;
      case G_TYPE_DOUBLE:
        {
          /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
          gdouble da = g_value_get_double (a);
          gdouble db = g_value_get_double (b);
          ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
        }
        break;
      case G_TYPE_STRING:
        ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
        break;
      case G_TYPE_VARIANT:
        ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
        break;
      default:
        if (G_VALUE_TYPE (a) == G_TYPE_STRV)
          ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
        else
          g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
        break;
    }
  return ret;
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.evolution.dataserver.Source
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.evolution.dataserver.Source ---- */

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

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

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

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

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

static const GDBusArgInfo * const _e_dbus_source_method_info_invoke_credentials_required_IN_ARG_pointers[] =
{
  &_e_dbus_source_method_info_invoke_credentials_required_IN_ARG_reason.parent_struct,
  &_e_dbus_source_method_info_invoke_credentials_required_IN_ARG_certificate_pem.parent_struct,
  &_e_dbus_source_method_info_invoke_credentials_required_IN_ARG_certificate_errors.parent_struct,
  &_e_dbus_source_method_info_invoke_credentials_required_IN_ARG_dbus_error_name.parent_struct,
  &_e_dbus_source_method_info_invoke_credentials_required_IN_ARG_dbus_error_message.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_method_info_invoke_credentials_required =
{
  {
    -1,
    (gchar *) "InvokeCredentialsRequired",
    (GDBusArgInfo **) &_e_dbus_source_method_info_invoke_credentials_required_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-invoke-credentials-required",
  FALSE
};

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

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

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

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

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

static const GDBusArgInfo * const _e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_pointers[] =
{
  &_e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_reason.parent_struct,
  &_e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_certificate_pem.parent_struct,
  &_e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_certificate_errors.parent_struct,
  &_e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_dbus_error_name.parent_struct,
  &_e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_dbus_error_message.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_method_info_get_last_credentials_required_arguments =
{
  {
    -1,
    (gchar *) "GetLastCredentialsRequiredArguments",
    NULL,
    (GDBusArgInfo **) &_e_dbus_source_method_info_get_last_credentials_required_arguments_OUT_ARG_pointers,
    NULL
  },
  "handle-get-last-credentials-required-arguments",
  FALSE
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_method_info_unset_last_credentials_required_arguments =
{
  {
    -1,
    (gchar *) "UnsetLastCredentialsRequiredArguments",
    NULL,
    NULL,
    NULL
  },
  "handle-unset-last-credentials-required-arguments",
  FALSE
};

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

static const GDBusArgInfo * const _e_dbus_source_method_info_invoke_authenticate_IN_ARG_pointers[] =
{
  &_e_dbus_source_method_info_invoke_authenticate_IN_ARG_credentials.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_method_info_invoke_authenticate =
{
  {
    -1,
    (gchar *) "InvokeAuthenticate",
    (GDBusArgInfo **) &_e_dbus_source_method_info_invoke_authenticate_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-invoke-authenticate",
  FALSE
};

static const GDBusMethodInfo * const _e_dbus_source_method_info_pointers[] =
{
  &_e_dbus_source_method_info_invoke_credentials_required.parent_struct,
  &_e_dbus_source_method_info_get_last_credentials_required_arguments.parent_struct,
  &_e_dbus_source_method_info_unset_last_credentials_required_arguments.parent_struct,
  &_e_dbus_source_method_info_invoke_authenticate.parent_struct,
  NULL
};

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

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

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

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

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

static const GDBusArgInfo * const _e_dbus_source_signal_info_credentials_required_ARG_pointers[] =
{
  &_e_dbus_source_signal_info_credentials_required_ARG_reason.parent_struct,
  &_e_dbus_source_signal_info_credentials_required_ARG_certificate_pem.parent_struct,
  &_e_dbus_source_signal_info_credentials_required_ARG_certificate_errors.parent_struct,
  &_e_dbus_source_signal_info_credentials_required_ARG_dbus_error_name.parent_struct,
  &_e_dbus_source_signal_info_credentials_required_ARG_dbus_error_message.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _e_dbus_source_signal_info_credentials_required =
{
  {
    -1,
    (gchar *) "CredentialsRequired",
    (GDBusArgInfo **) &_e_dbus_source_signal_info_credentials_required_ARG_pointers,
    NULL
  },
  "credentials-required"
};

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

static const GDBusArgInfo * const _e_dbus_source_signal_info_authenticate_ARG_pointers[] =
{
  &_e_dbus_source_signal_info_authenticate_ARG_credentials.parent_struct,
  NULL
};

static const _ExtendedGDBusSignalInfo _e_dbus_source_signal_info_authenticate =
{
  {
    -1,
    (gchar *) "Authenticate",
    (GDBusArgInfo **) &_e_dbus_source_signal_info_authenticate_ARG_pointers,
    NULL
  },
  "authenticate"
};

static const GDBusSignalInfo * const _e_dbus_source_signal_info_pointers[] =
{
  &_e_dbus_source_signal_info_credentials_required.parent_struct,
  &_e_dbus_source_signal_info_authenticate.parent_struct,
  NULL
};

static const _ExtendedGDBusPropertyInfo _e_dbus_source_property_info_uid =
{
  {
    -1,
    (gchar *) "UID",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "uid",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _e_dbus_source_property_info_data =
{
  {
    -1,
    (gchar *) "Data",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
    NULL
  },
  "data",
  FALSE,
  TRUE
};

static const _ExtendedGDBusPropertyInfo _e_dbus_source_property_info_connection_status =
{
  {
    -1,
    (gchar *) "ConnectionStatus",
    (gchar *) "s",
    G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
    NULL
  },
  "connection-status",
  FALSE,
  TRUE
};

static const GDBusPropertyInfo * const _e_dbus_source_property_info_pointers[] =
{
  &_e_dbus_source_property_info_uid.parent_struct,
  &_e_dbus_source_property_info_data.parent_struct,
  &_e_dbus_source_property_info_connection_status.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _e_dbus_source_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.evolution.dataserver.Source",
    (GDBusMethodInfo **) &_e_dbus_source_method_info_pointers,
    (GDBusSignalInfo **) &_e_dbus_source_signal_info_pointers,
    (GDBusPropertyInfo **) &_e_dbus_source_property_info_pointers,
    NULL
  },
  "source",
};


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

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



/**
 * EDBusSource:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link>.
 */

/**
 * EDBusSourceIface:
 * @parent_iface: The parent interface.
 * @get_connection_status: Getter for the #EDBusSource:connection-status property.
 * @get_data: Getter for the #EDBusSource:data property.
 * @get_uid: Getter for the #EDBusSource:uid property.
 * @credentials_required: Handler for the #EDBusSource::credentials-required signal.
 * @handle_get_last_credentials_required_arguments: Handler for the #EDBusSource::handle-get-last-credentials-required-arguments signal.
 * @handle_invoke_authenticate: Handler for the #EDBusSource::handle-invoke-authenticate signal.
 * @handle_invoke_credentials_required: Handler for the #EDBusSource::handle-invoke-credentials-required signal.
 * @authenticate: Handler for the #EDBusSource::authenticate signal.
 * @handle_unset_last_credentials_required_arguments: Handler for the #EDBusSource::handle-unset-last-credentials-required-arguments signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link>.
 */

typedef EDBusSourceIface EDBusSourceInterface;
G_DEFINE_INTERFACE (EDBusSource, e_dbus_source, G_TYPE_OBJECT)

static void
e_dbus_source_default_init (EDBusSourceIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * EDBusSource::handle-invoke-credentials-required:
   * @object: A #EDBusSource.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_reason: Argument passed by remote caller.
   * @arg_certificate_pem: Argument passed by remote caller.
   * @arg_certificate_errors: Argument passed by remote caller.
   * @arg_dbus_error_name: Argument passed by remote caller.
   * @arg_dbus_error_message: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeCredentialsRequired">InvokeCredentialsRequired()</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 e_dbus_source_complete_invoke_credentials_required() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   *
   * Since: 3.16
   */
  g_signal_new ("handle-invoke-credentials-required",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceIface, handle_invoke_credentials_required),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    6,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * EDBusSource::handle-get-last-credentials-required-arguments:
   * @object: A #EDBusSource.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.GetLastCredentialsRequiredArguments">GetLastCredentialsRequiredArguments()</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 e_dbus_source_complete_get_last_credentials_required_arguments() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   *
   * Since: 3.16
   */
  g_signal_new ("handle-get-last-credentials-required-arguments",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceIface, handle_get_last_credentials_required_arguments),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * EDBusSource::handle-unset-last-credentials-required-arguments:
   * @object: A #EDBusSource.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.UnsetLastCredentialsRequiredArguments">UnsetLastCredentialsRequiredArguments()</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 e_dbus_source_complete_unset_last_credentials_required_arguments() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   *
   * Since: 3.18
   */
  g_signal_new ("handle-unset-last-credentials-required-arguments",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceIface, handle_unset_last_credentials_required_arguments),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

  /**
   * EDBusSource::handle-invoke-authenticate:
   * @object: A #EDBusSource.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_credentials: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeAuthenticate">InvokeAuthenticate()</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 e_dbus_source_complete_invoke_authenticate() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   *
   * Since: 3.16
   */
  g_signal_new ("handle-invoke-authenticate",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceIface, handle_invoke_authenticate),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);

  /* GObject signals for received D-Bus signals: */
  /**
   * EDBusSource::credentials-required:
   * @object: A #EDBusSource.
   * @arg_reason: Argument.
   * @arg_certificate_pem: Argument.
   * @arg_certificate_errors: Argument.
   * @arg_dbus_error_name: Argument.
   * @arg_dbus_error_message: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-gnome-evolution-dataserver-Source.CredentialsRequired">"CredentialsRequired"</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 ("credentials-required",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceIface, credentials_required),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * EDBusSource::authenticate:
   * @object: A #EDBusSource.
   * @arg_credentials: Argument.
   *
   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-gnome-evolution-dataserver-Source.Authenticate">"Authenticate"</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.
   *
   * Since: 3.16
   */
  g_signal_new ("authenticate",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceIface, authenticate),
    NULL,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_NONE,
    1, G_TYPE_STRV);

  /* GObject properties for D-Bus properties: */
  /**
   * EDBusSource:uid:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.UID">"UID"</link>.
   *
   * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_string ("uid", "UID", "UID", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * EDBusSource:data:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.Data">"Data"</link>.
   *
   * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
   */
  g_object_interface_install_property (iface,
    g_param_spec_string ("data", "Data", "Data", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  /**
   * EDBusSource:connection-status:
   *
   * Represents the D-Bus property <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.ConnectionStatus">"ConnectionStatus"</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 ("connection-status", "ConnectionStatus", "ConnectionStatus", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

/**
 * e_dbus_source_get_uid: (skip)
 * @object: A #EDBusSource.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.UID">"UID"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use e_dbus_source_dup_uid() if on another thread.
 *
 * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
e_dbus_source_get_uid (EDBusSource *object)
{
  return E_DBUS_SOURCE_GET_IFACE (object)->get_uid (object);
}

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

/**
 * e_dbus_source_set_uid: (skip)
 * @object: A #EDBusSource.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.UID">"UID"</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
e_dbus_source_set_uid (EDBusSource *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "uid", value, NULL);
}

/**
 * e_dbus_source_get_data: (skip)
 * @object: A #EDBusSource.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.Data">"Data"</link> D-Bus property.
 *
 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
 *
 * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use e_dbus_source_dup_data() if on another thread.
 *
 * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
e_dbus_source_get_data (EDBusSource *object)
{
  return E_DBUS_SOURCE_GET_IFACE (object)->get_data (object);
}

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

/**
 * e_dbus_source_set_data: (skip)
 * @object: A #EDBusSource.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.Data">"Data"</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
e_dbus_source_set_data (EDBusSource *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "data", value, NULL);
}

/**
 * e_dbus_source_get_connection_status: (skip)
 * @object: A #EDBusSource.
 *
 * Gets the value of the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.ConnectionStatus">"ConnectionStatus"</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.
 *
 * 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 e_dbus_source_dup_connection_status() if on another thread.
 *
 * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
 */
const gchar *
e_dbus_source_get_connection_status (EDBusSource *object)
{
  return E_DBUS_SOURCE_GET_IFACE (object)->get_connection_status (object);
}

/**
 * e_dbus_source_dup_connection_status: (skip)
 * @object: A #EDBusSource.
 *
 * Gets a copy of the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.ConnectionStatus">"ConnectionStatus"</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) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
 */
gchar *
e_dbus_source_dup_connection_status (EDBusSource *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "connection-status", &value, NULL);
  return value;
}

/**
 * e_dbus_source_set_connection_status: (skip)
 * @object: A #EDBusSource.
 * @value: The value to set.
 *
 * Sets the <link linkend="gdbus-property-org-gnome-evolution-dataserver-Source.ConnectionStatus">"ConnectionStatus"</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
e_dbus_source_set_connection_status (EDBusSource *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "connection-status", value, NULL);
}

/**
 * e_dbus_source_emit_credentials_required:
 * @object: A #EDBusSource.
 * @arg_reason: Argument to pass with the signal.
 * @arg_certificate_pem: Argument to pass with the signal.
 * @arg_certificate_errors: Argument to pass with the signal.
 * @arg_dbus_error_name: Argument to pass with the signal.
 * @arg_dbus_error_message: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-gnome-evolution-dataserver-Source.CredentialsRequired">"CredentialsRequired"</link> D-Bus signal.
 */
void
e_dbus_source_emit_credentials_required (
    EDBusSource *object,
    const gchar *arg_reason,
    const gchar *arg_certificate_pem,
    const gchar *arg_certificate_errors,
    const gchar *arg_dbus_error_name,
    const gchar *arg_dbus_error_message)
{
  g_signal_emit_by_name (object, "credentials-required", arg_reason, arg_certificate_pem, arg_certificate_errors, arg_dbus_error_name, arg_dbus_error_message);
}

/**
 * e_dbus_source_emit_authenticate:
 * @object: A #EDBusSource.
 * @arg_credentials: Argument to pass with the signal.
 *
 * Emits the <link linkend="gdbus-signal-org-gnome-evolution-dataserver-Source.Authenticate">"Authenticate"</link> D-Bus signal.
 *
 * Since: 3.16
 */
void
e_dbus_source_emit_authenticate (
    EDBusSource *object,
    const gchar *const *arg_credentials)
{
  g_signal_emit_by_name (object, "authenticate", arg_credentials);
}

/**
 * e_dbus_source_call_invoke_credentials_required:
 * @proxy: A #EDBusSourceProxy.
 * @arg_reason: Argument to pass with the method invocation.
 * @arg_certificate_pem: Argument to pass with the method invocation.
 * @arg_certificate_errors: Argument to pass with the method invocation.
 * @arg_dbus_error_name: Argument to pass with the method invocation.
 * @arg_dbus_error_message: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeCredentialsRequired">InvokeCredentialsRequired()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_call_invoke_credentials_required_finish() to get the result of the operation.
 *
 * See e_dbus_source_call_invoke_credentials_required_sync() for the synchronous, blocking version of this method.
 *
 * Since: 3.16
 */
void
e_dbus_source_call_invoke_credentials_required (
    EDBusSource *proxy,
    const gchar *arg_reason,
    const gchar *arg_certificate_pem,
    const gchar *arg_certificate_errors,
    const gchar *arg_dbus_error_name,
    const gchar *arg_dbus_error_message,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "InvokeCredentialsRequired",
    g_variant_new ("(sssss)",
                   arg_reason,
                   arg_certificate_pem,
                   arg_certificate_errors,
                   arg_dbus_error_name,
                   arg_dbus_error_message),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * e_dbus_source_call_invoke_credentials_required_sync:
 * @proxy: A #EDBusSourceProxy.
 * @arg_reason: Argument to pass with the method invocation.
 * @arg_certificate_pem: Argument to pass with the method invocation.
 * @arg_certificate_errors: Argument to pass with the method invocation.
 * @arg_dbus_error_name: Argument to pass with the method invocation.
 * @arg_dbus_error_message: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeCredentialsRequired">InvokeCredentialsRequired()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_call_invoke_credentials_required() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Since: 3.16
 */
gboolean
e_dbus_source_call_invoke_credentials_required_sync (
    EDBusSource *proxy,
    const gchar *arg_reason,
    const gchar *arg_certificate_pem,
    const gchar *arg_certificate_errors,
    const gchar *arg_dbus_error_name,
    const gchar *arg_dbus_error_message,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "InvokeCredentialsRequired",
    g_variant_new ("(sssss)",
                   arg_reason,
                   arg_certificate_pem,
                   arg_certificate_errors,
                   arg_dbus_error_name,
                   arg_dbus_error_message),
    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;
}

/**
 * e_dbus_source_call_get_last_credentials_required_arguments:
 * @proxy: A #EDBusSourceProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.GetLastCredentialsRequiredArguments">GetLastCredentialsRequiredArguments()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_call_get_last_credentials_required_arguments_finish() to get the result of the operation.
 *
 * See e_dbus_source_call_get_last_credentials_required_arguments_sync() for the synchronous, blocking version of this method.
 *
 * Since: 3.16
 */
void
e_dbus_source_call_get_last_credentials_required_arguments (
    EDBusSource *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetLastCredentialsRequiredArguments",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

/**
 * e_dbus_source_call_get_last_credentials_required_arguments_finish:
 * @proxy: A #EDBusSourceProxy.
 * @out_reason: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_certificate_pem: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_certificate_errors: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_dbus_error_name: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_dbus_error_message: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_call_get_last_credentials_required_arguments().
 * @error: Return location for error or %NULL.
 *
 * Finishes an operation started with e_dbus_source_call_get_last_credentials_required_arguments().
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Since: 3.16
 */
gboolean
e_dbus_source_call_get_last_credentials_required_arguments_finish (
    EDBusSource *proxy,
    gchar **out_reason,
    gchar **out_certificate_pem,
    gchar **out_certificate_errors,
    gchar **out_dbus_error_name,
    gchar **out_dbus_error_message,
    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,
                 "(sssss)",
                 out_reason,
                 out_certificate_pem,
                 out_certificate_errors,
                 out_dbus_error_name,
                 out_dbus_error_message);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * e_dbus_source_call_get_last_credentials_required_arguments_sync:
 * @proxy: A #EDBusSourceProxy.
 * @out_reason: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_certificate_pem: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_certificate_errors: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_dbus_error_name: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_dbus_error_message: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.GetLastCredentialsRequiredArguments">GetLastCredentialsRequiredArguments()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_call_get_last_credentials_required_arguments() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Since: 3.16
 */
gboolean
e_dbus_source_call_get_last_credentials_required_arguments_sync (
    EDBusSource *proxy,
    gchar **out_reason,
    gchar **out_certificate_pem,
    gchar **out_certificate_errors,
    gchar **out_dbus_error_name,
    gchar **out_dbus_error_message,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetLastCredentialsRequiredArguments",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(sssss)",
                 out_reason,
                 out_certificate_pem,
                 out_certificate_errors,
                 out_dbus_error_name,
                 out_dbus_error_message);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * e_dbus_source_call_unset_last_credentials_required_arguments:
 * @proxy: A #EDBusSourceProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.UnsetLastCredentialsRequiredArguments">UnsetLastCredentialsRequiredArguments()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_call_unset_last_credentials_required_arguments_finish() to get the result of the operation.
 *
 * See e_dbus_source_call_unset_last_credentials_required_arguments_sync() for the synchronous, blocking version of this method.
 *
 * Since: 3.18
 */
void
e_dbus_source_call_unset_last_credentials_required_arguments (
    EDBusSource *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "UnsetLastCredentialsRequiredArguments",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * e_dbus_source_call_unset_last_credentials_required_arguments_sync:
 * @proxy: A #EDBusSourceProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.UnsetLastCredentialsRequiredArguments">UnsetLastCredentialsRequiredArguments()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_call_unset_last_credentials_required_arguments() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Since: 3.18
 */
gboolean
e_dbus_source_call_unset_last_credentials_required_arguments_sync (
    EDBusSource *proxy,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "UnsetLastCredentialsRequiredArguments",
    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;
}

/**
 * e_dbus_source_call_invoke_authenticate:
 * @proxy: A #EDBusSourceProxy.
 * @arg_credentials: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeAuthenticate">InvokeAuthenticate()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_call_invoke_authenticate_finish() to get the result of the operation.
 *
 * See e_dbus_source_call_invoke_authenticate_sync() for the synchronous, blocking version of this method.
 *
 * Since: 3.16
 */
void
e_dbus_source_call_invoke_authenticate (
    EDBusSource *proxy,
    const gchar *const *arg_credentials,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "InvokeAuthenticate",
    g_variant_new ("(^as)",
                   arg_credentials),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * e_dbus_source_call_invoke_authenticate_sync:
 * @proxy: A #EDBusSourceProxy.
 * @arg_credentials: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeAuthenticate">InvokeAuthenticate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_call_invoke_authenticate() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 *
 * Since: 3.16
 */
gboolean
e_dbus_source_call_invoke_authenticate_sync (
    EDBusSource *proxy,
    const gchar *const *arg_credentials,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "InvokeAuthenticate",
    g_variant_new ("(^as)",
                   arg_credentials),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * e_dbus_source_complete_invoke_credentials_required:
 * @object: A #EDBusSource.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeCredentialsRequired">InvokeCredentialsRequired()</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.
 *
 * Since: 3.16
 */
void
e_dbus_source_complete_invoke_credentials_required (
    EDBusSource *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * e_dbus_source_complete_get_last_credentials_required_arguments:
 * @object: A #EDBusSource.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @reason: Parameter to return.
 * @certificate_pem: Parameter to return.
 * @certificate_errors: Parameter to return.
 * @dbus_error_name: Parameter to return.
 * @dbus_error_message: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.GetLastCredentialsRequiredArguments">GetLastCredentialsRequiredArguments()</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.
 *
 * Since: 3.16
 */
void
e_dbus_source_complete_get_last_credentials_required_arguments (
    EDBusSource *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *reason,
    const gchar *certificate_pem,
    const gchar *certificate_errors,
    const gchar *dbus_error_name,
    const gchar *dbus_error_message)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(sssss)",
                   reason,
                   certificate_pem,
                   certificate_errors,
                   dbus_error_name,
                   dbus_error_message));
}

/**
 * e_dbus_source_complete_unset_last_credentials_required_arguments:
 * @object: A #EDBusSource.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.UnsetLastCredentialsRequiredArguments">UnsetLastCredentialsRequiredArguments()</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.
 *
 * Since: 3.18
 */
void
e_dbus_source_complete_unset_last_credentials_required_arguments (
    EDBusSource *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

/**
 * e_dbus_source_complete_invoke_authenticate:
 * @object: A #EDBusSource.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source.InvokeAuthenticate">InvokeAuthenticate()</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.
 *
 * Since: 3.16
 */
void
e_dbus_source_complete_invoke_authenticate (
    EDBusSource *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("()"));
}

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

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

/**
 * EDBusSourceProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceProxy.
 */

struct _EDBusSourceProxyPrivate
{
  GData *qdata;
};

static void e_dbus_source_proxy_iface_init (EDBusSourceIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceProxy, e_dbus_source_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (EDBusSourceProxy)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE, e_dbus_source_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceProxy, e_dbus_source_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE, e_dbus_source_proxy_iface_init))

#endif
static void
e_dbus_source_proxy_finalize (GObject *object)
{
  EDBusSourceProxy *proxy = E_DBUS_SOURCE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (e_dbus_source_proxy_parent_class)->finalize (object);
}

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

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

static void
e_dbus_source_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], E_DBUS_TYPE_SOURCE);
  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, E_DBUS_TYPE_SOURCE);
  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
e_dbus_source_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  EDBusSourceProxy *proxy = E_DBUS_SOURCE_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 *) &_e_dbus_source_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static const gchar *
e_dbus_source_proxy_get_uid (EDBusSource *object)
{
  EDBusSourceProxy *proxy = E_DBUS_SOURCE_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "UID");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
e_dbus_source_proxy_get_data (EDBusSource *object)
{
  EDBusSourceProxy *proxy = E_DBUS_SOURCE_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Data");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static const gchar *
e_dbus_source_proxy_get_connection_status (EDBusSource *object)
{
  EDBusSourceProxy *proxy = E_DBUS_SOURCE_PROXY (object);
  GVariant *variant;
  const gchar *value = NULL;
  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ConnectionStatus");
  if (variant != NULL)
    {
      value = g_variant_get_string (variant, NULL);
      g_variant_unref (variant);
    }
  return value;
}

static void
e_dbus_source_proxy_init (EDBusSourceProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = e_dbus_source_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_PROXY, EDBusSourceProxyPrivate);
#endif

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

static void
e_dbus_source_proxy_class_init (EDBusSourceProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = e_dbus_source_proxy_finalize;
  gobject_class->get_property = e_dbus_source_proxy_get_property;
  gobject_class->set_property = e_dbus_source_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = e_dbus_source_proxy_g_signal;
  proxy_class->g_properties_changed = e_dbus_source_proxy_g_properties_changed;

  e_dbus_source_override_properties (gobject_class, 1);

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

static void
e_dbus_source_proxy_iface_init (EDBusSourceIface *iface)
{
  iface->get_uid = e_dbus_source_proxy_get_uid;
  iface->get_data = e_dbus_source_proxy_get_data;
  iface->get_connection_status = e_dbus_source_proxy_get_connection_status;
}

/**
 * e_dbus_source_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_proxy_new_finish() to get the result of the operation.
 *
 * See e_dbus_source_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_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 (E_DBUS_TYPE_SOURCE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source", NULL);
}

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

/**
 * e_dbus_source_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSource *
e_dbus_source_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_SOURCE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE (ret);
  else
    return NULL;
}


/**
 * e_dbus_source_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_source_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_source_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_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 (E_DBUS_TYPE_SOURCE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source", NULL);
}

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

/**
 * e_dbus_source_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_source_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSource *
e_dbus_source_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 (E_DBUS_TYPE_SOURCE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE (ret);
  else
    return NULL;
}


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

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

/**
 * EDBusSourceSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceSkeleton.
 */

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

static void
_e_dbus_source_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], E_DBUS_TYPE_SOURCE);
  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, E_DBUS_TYPE_SOURCE);
  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 *
_e_dbus_source_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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 *) &_e_dbus_source_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_e_dbus_source_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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 *) &_e_dbus_source_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _e_dbus_source_skeleton_vtable =
{
  _e_dbus_source_skeleton_handle_method_call,
  _e_dbus_source_skeleton_handle_get_property,
  _e_dbus_source_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
e_dbus_source_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return e_dbus_source_interface_info ();
}

static GDBusInterfaceVTable *
e_dbus_source_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_e_dbus_source_skeleton_vtable;
}

static GVariant *
e_dbus_source_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_SKELETON (_skeleton);

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

static void
e_dbus_source_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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)
    _e_dbus_source_emit_changed (skeleton);
}

static void
_e_dbus_source_on_signal_credentials_required (
    EDBusSource *object,
    const gchar *arg_reason,
    const gchar *arg_certificate_pem,
    const gchar *arg_certificate_errors,
    const gchar *arg_dbus_error_name,
    const gchar *arg_dbus_error_message)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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 ("(sssss)",
                   arg_reason,
                   arg_certificate_pem,
                   arg_certificate_errors,
                   arg_dbus_error_name,
                   arg_dbus_error_message));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source", "CredentialsRequired",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void
_e_dbus_source_on_signal_authenticate (
    EDBusSource *object,
    const gchar *const *arg_credentials)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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 ("(^as)",
                   arg_credentials));
  for (l = connections; l != NULL; l = l->next)
    {
      GDBusConnection *connection = l->data;
      g_dbus_connection_emit_signal (connection,
        NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source", "Authenticate",
        signal_variant, NULL);
    }
  g_variant_unref (signal_variant);
  g_list_free_full (connections, g_object_unref);
}

static void e_dbus_source_skeleton_iface_init (EDBusSourceIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceSkeleton, e_dbus_source_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (EDBusSourceSkeleton)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE, e_dbus_source_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceSkeleton, e_dbus_source_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE, e_dbus_source_skeleton_iface_init))

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

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

static gboolean
_e_dbus_source_emit_changed (gpointer user_data)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_SKELETON (user_data);
  GList *l;
  GVariantBuilder builder;
  GVariantBuilder invalidated_builder;
  guint num_changes;

  g_mutex_lock (&skeleton->priv->lock);
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
    {
      ChangedProperty *cp = l->data;
      GVariant *variant;
      const GValue *cur_value;

      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
      if (!_g_value_equal (cur_value, &cp->orig_value))
        {
          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
          g_variant_unref (variant);
          num_changes++;
        }
    }
  if (num_changes > 0)
    {
      GList *connections, *ll;
      GVariant *signal_variant;
      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.gnome.evolution.dataserver.Source",
                                           &builder, &invalidated_builder));
      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
      for (ll = connections; ll != NULL; ll = ll->next)
        {
          GDBusConnection *connection = ll->data;

          g_dbus_connection_emit_signal (connection,
                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
                                         "org.freedesktop.DBus.Properties",
                                         "PropertiesChanged",
                                         signal_variant,
                                         NULL);
        }
      g_variant_unref (signal_variant);
      g_list_free_full (connections, g_object_unref);
    }
  else
    {
      g_variant_builder_clear (&builder);
      g_variant_builder_clear (&invalidated_builder);
    }
  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  skeleton->priv->changed_properties = NULL;
  skeleton->priv->changed_properties_idle_source = NULL;
  g_mutex_unlock (&skeleton->priv->lock);
  return FALSE;
}

static void
_e_dbus_source_schedule_emit_changed (EDBusSourceSkeleton *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
e_dbus_source_skeleton_notify (GObject      *object,
  GParamSpec *pspec G_GNUC_UNUSED)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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, _e_dbus_source_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
      g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated] _e_dbus_source_emit_changed");
      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
      g_source_unref (skeleton->priv->changed_properties_idle_source);
    }
  g_mutex_unlock (&skeleton->priv->lock);
}

static void
e_dbus_source_skeleton_set_property (GObject      *object,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  const _ExtendedGDBusPropertyInfo *info;
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_SKELETON (object);
  g_assert (prop_id != 0 && prop_id - 1 < 3);
  info = (const _ExtendedGDBusPropertyInfo *) _e_dbus_source_property_info_pointers[prop_id - 1];
  g_mutex_lock (&skeleton->priv->lock);
  g_object_freeze_notify (object);
  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
    {
      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
          info->emits_changed_signal)
        _e_dbus_source_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
      g_object_notify_by_pspec (object, pspec);
    }
  g_mutex_unlock (&skeleton->priv->lock);
  g_object_thaw_notify (object);
}

static void
e_dbus_source_skeleton_init (EDBusSourceSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = e_dbus_source_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_SKELETON, EDBusSourceSkeletonPrivate);
#endif

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

static const gchar *
e_dbus_source_skeleton_get_uid (EDBusSource *object)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[0]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
e_dbus_source_skeleton_get_data (EDBusSource *object)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_SKELETON (object);
  const gchar *value;
  g_mutex_lock (&skeleton->priv->lock);
  value = g_value_get_string (&(skeleton->priv->properties[1]));
  g_mutex_unlock (&skeleton->priv->lock);
  return value;
}

static const gchar *
e_dbus_source_skeleton_get_connection_status (EDBusSource *object)
{
  EDBusSourceSkeleton *skeleton = E_DBUS_SOURCE_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 void
e_dbus_source_skeleton_class_init (EDBusSourceSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize = e_dbus_source_skeleton_finalize;
  gobject_class->get_property = e_dbus_source_skeleton_get_property;
  gobject_class->set_property = e_dbus_source_skeleton_set_property;
  gobject_class->notify       = e_dbus_source_skeleton_notify;


  e_dbus_source_override_properties (gobject_class, 1);

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = e_dbus_source_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = e_dbus_source_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = e_dbus_source_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = e_dbus_source_skeleton_dbus_interface_get_vtable;

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

static void
e_dbus_source_skeleton_iface_init (EDBusSourceIface *iface)
{
  iface->credentials_required = _e_dbus_source_on_signal_credentials_required;
  iface->authenticate = _e_dbus_source_on_signal_authenticate;
  iface->get_uid = e_dbus_source_skeleton_get_uid;
  iface->get_data = e_dbus_source_skeleton_get_data;
  iface->get_connection_status = e_dbus_source_skeleton_get_connection_status;
}

/**
 * e_dbus_source_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link>.
 *
 * Returns: (transfer full) (type EDBusSourceSkeleton): The skeleton object.
 */
EDBusSource *
e_dbus_source_skeleton_new (void)
{
  return E_DBUS_SOURCE (g_object_new (E_DBUS_TYPE_SOURCE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.evolution.dataserver.Source.Removable
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.evolution.dataserver.Source.Removable ---- */

static const _ExtendedGDBusMethodInfo _e_dbus_source_removable_method_info_remove =
{
  {
    -1,
    (gchar *) "Remove",
    NULL,
    NULL,
    NULL
  },
  "handle-remove",
  FALSE
};

static const GDBusMethodInfo * const _e_dbus_source_removable_method_info_pointers[] =
{
  &_e_dbus_source_removable_method_info_remove.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _e_dbus_source_removable_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.evolution.dataserver.Source.Removable",
    (GDBusMethodInfo **) &_e_dbus_source_removable_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "source-removable",
};


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

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



/**
 * EDBusSourceRemovable:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link>.
 */

/**
 * EDBusSourceRemovableIface:
 * @parent_iface: The parent interface.
 * @handle_remove: Handler for the #EDBusSourceRemovable::handle-remove signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link>.
 */

typedef EDBusSourceRemovableIface EDBusSourceRemovableInterface;
G_DEFINE_INTERFACE (EDBusSourceRemovable, e_dbus_source_removable, G_TYPE_OBJECT)

static void
e_dbus_source_removable_default_init (EDBusSourceRemovableIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * EDBusSourceRemovable::handle-remove:
   * @object: A #EDBusSourceRemovable.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-Removable.Remove">Remove()</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 e_dbus_source_removable_complete_remove() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-remove",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceRemovableIface, handle_remove),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

}

/**
 * e_dbus_source_removable_call_remove:
 * @proxy: A #EDBusSourceRemovableProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-Removable.Remove">Remove()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_removable_call_remove_finish() to get the result of the operation.
 *
 * See e_dbus_source_removable_call_remove_sync() for the synchronous, blocking version of this method.
 */
void
e_dbus_source_removable_call_remove (
    EDBusSourceRemovable *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Remove",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

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

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

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

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

/**
 * EDBusSourceRemovableProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceRemovableProxy.
 */

struct _EDBusSourceRemovableProxyPrivate
{
  GData *qdata;
};

static void e_dbus_source_removable_proxy_iface_init (EDBusSourceRemovableIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemovableProxy, e_dbus_source_removable_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (EDBusSourceRemovableProxy)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOVABLE, e_dbus_source_removable_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemovableProxy, e_dbus_source_removable_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOVABLE, e_dbus_source_removable_proxy_iface_init))

#endif
static void
e_dbus_source_removable_proxy_finalize (GObject *object)
{
  EDBusSourceRemovableProxy *proxy = E_DBUS_SOURCE_REMOVABLE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (e_dbus_source_removable_proxy_parent_class)->finalize (object);
}

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

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

static void
e_dbus_source_removable_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_removable_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], E_DBUS_TYPE_SOURCE_REMOVABLE);
  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, E_DBUS_TYPE_SOURCE_REMOVABLE);
  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
e_dbus_source_removable_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  EDBusSourceRemovableProxy *proxy = E_DBUS_SOURCE_REMOVABLE_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 *) &_e_dbus_source_removable_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_removable_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
e_dbus_source_removable_proxy_init (EDBusSourceRemovableProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = e_dbus_source_removable_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_REMOVABLE_PROXY, EDBusSourceRemovableProxyPrivate);
#endif

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

static void
e_dbus_source_removable_proxy_class_init (EDBusSourceRemovableProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = e_dbus_source_removable_proxy_finalize;
  gobject_class->get_property = e_dbus_source_removable_proxy_get_property;
  gobject_class->set_property = e_dbus_source_removable_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = e_dbus_source_removable_proxy_g_signal;
  proxy_class->g_properties_changed = e_dbus_source_removable_proxy_g_properties_changed;

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

static void
e_dbus_source_removable_proxy_iface_init (EDBusSourceRemovableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_removable_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_removable_proxy_new_finish() to get the result of the operation.
 *
 * See e_dbus_source_removable_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_removable_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 (E_DBUS_TYPE_SOURCE_REMOVABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Removable", NULL);
}

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

/**
 * e_dbus_source_removable_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_removable_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceRemovableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceRemovable *
e_dbus_source_removable_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOVABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Removable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_REMOVABLE (ret);
  else
    return NULL;
}


/**
 * e_dbus_source_removable_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_source_removable_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_removable_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_source_removable_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_removable_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 (E_DBUS_TYPE_SOURCE_REMOVABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Removable", NULL);
}

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

/**
 * e_dbus_source_removable_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_source_removable_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_removable_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceRemovableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceRemovable *
e_dbus_source_removable_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 (E_DBUS_TYPE_SOURCE_REMOVABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Removable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_REMOVABLE (ret);
  else
    return NULL;
}


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

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

/**
 * EDBusSourceRemovableSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceRemovableSkeleton.
 */

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

static void
_e_dbus_source_removable_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  EDBusSourceRemovableSkeleton *skeleton = E_DBUS_SOURCE_REMOVABLE_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], E_DBUS_TYPE_SOURCE_REMOVABLE);
  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, E_DBUS_TYPE_SOURCE_REMOVABLE);
  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 *
_e_dbus_source_removable_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  EDBusSourceRemovableSkeleton *skeleton = E_DBUS_SOURCE_REMOVABLE_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 *) &_e_dbus_source_removable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_e_dbus_source_removable_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  EDBusSourceRemovableSkeleton *skeleton = E_DBUS_SOURCE_REMOVABLE_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 *) &_e_dbus_source_removable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _e_dbus_source_removable_skeleton_vtable =
{
  _e_dbus_source_removable_skeleton_handle_method_call,
  _e_dbus_source_removable_skeleton_handle_get_property,
  _e_dbus_source_removable_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
e_dbus_source_removable_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return e_dbus_source_removable_interface_info ();
}

static GDBusInterfaceVTable *
e_dbus_source_removable_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_e_dbus_source_removable_skeleton_vtable;
}

static GVariant *
e_dbus_source_removable_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceRemovableSkeleton *skeleton = E_DBUS_SOURCE_REMOVABLE_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_e_dbus_source_removable_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _e_dbus_source_removable_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _e_dbus_source_removable_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _e_dbus_source_removable_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source.Removable", 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
e_dbus_source_removable_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void e_dbus_source_removable_skeleton_iface_init (EDBusSourceRemovableIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemovableSkeleton, e_dbus_source_removable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (EDBusSourceRemovableSkeleton)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOVABLE, e_dbus_source_removable_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemovableSkeleton, e_dbus_source_removable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOVABLE, e_dbus_source_removable_skeleton_iface_init))

#endif
static void
e_dbus_source_removable_skeleton_finalize (GObject *object)
{
  EDBusSourceRemovableSkeleton *skeleton = E_DBUS_SOURCE_REMOVABLE_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 (e_dbus_source_removable_skeleton_parent_class)->finalize (object);
}

static void
e_dbus_source_removable_skeleton_init (EDBusSourceRemovableSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = e_dbus_source_removable_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_REMOVABLE_SKELETON, EDBusSourceRemovableSkeletonPrivate);
#endif

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

static void
e_dbus_source_removable_skeleton_class_init (EDBusSourceRemovableSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = e_dbus_source_removable_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = e_dbus_source_removable_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = e_dbus_source_removable_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = e_dbus_source_removable_skeleton_dbus_interface_get_vtable;

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

static void
e_dbus_source_removable_skeleton_iface_init (EDBusSourceRemovableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_removable_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link>.
 *
 * Returns: (transfer full) (type EDBusSourceRemovableSkeleton): The skeleton object.
 */
EDBusSourceRemovable *
e_dbus_source_removable_skeleton_new (void)
{
  return E_DBUS_SOURCE_REMOVABLE (g_object_new (E_DBUS_TYPE_SOURCE_REMOVABLE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.evolution.dataserver.Source.Writable
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.evolution.dataserver.Source.Writable ---- */

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

static const GDBusArgInfo * const _e_dbus_source_writable_method_info_write_IN_ARG_pointers[] =
{
  &_e_dbus_source_writable_method_info_write_IN_ARG_data.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_writable_method_info_write =
{
  {
    -1,
    (gchar *) "Write",
    (GDBusArgInfo **) &_e_dbus_source_writable_method_info_write_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-write",
  FALSE
};

static const GDBusMethodInfo * const _e_dbus_source_writable_method_info_pointers[] =
{
  &_e_dbus_source_writable_method_info_write.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _e_dbus_source_writable_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.evolution.dataserver.Source.Writable",
    (GDBusMethodInfo **) &_e_dbus_source_writable_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "source-writable",
};


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

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



/**
 * EDBusSourceWritable:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link>.
 */

/**
 * EDBusSourceWritableIface:
 * @parent_iface: The parent interface.
 * @handle_write: Handler for the #EDBusSourceWritable::handle-write signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link>.
 */

typedef EDBusSourceWritableIface EDBusSourceWritableInterface;
G_DEFINE_INTERFACE (EDBusSourceWritable, e_dbus_source_writable, G_TYPE_OBJECT)

static void
e_dbus_source_writable_default_init (EDBusSourceWritableIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * EDBusSourceWritable::handle-write:
   * @object: A #EDBusSourceWritable.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_data: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-Writable.Write">Write()</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 e_dbus_source_writable_complete_write() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-write",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceWritableIface, handle_write),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    2,
    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);

}

/**
 * e_dbus_source_writable_call_write:
 * @proxy: A #EDBusSourceWritableProxy.
 * @arg_data: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-Writable.Write">Write()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_writable_call_write_finish() to get the result of the operation.
 *
 * See e_dbus_source_writable_call_write_sync() for the synchronous, blocking version of this method.
 */
void
e_dbus_source_writable_call_write (
    EDBusSourceWritable *proxy,
    const gchar *arg_data,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Write",
    g_variant_new ("(s)",
                   arg_data),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * e_dbus_source_writable_call_write_sync:
 * @proxy: A #EDBusSourceWritableProxy.
 * @arg_data: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-Writable.Write">Write()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_writable_call_write() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
e_dbus_source_writable_call_write_sync (
    EDBusSourceWritable *proxy,
    const gchar *arg_data,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Write",
    g_variant_new ("(s)",
                   arg_data),
    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;
}

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

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

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

/**
 * EDBusSourceWritableProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceWritableProxy.
 */

struct _EDBusSourceWritableProxyPrivate
{
  GData *qdata;
};

static void e_dbus_source_writable_proxy_iface_init (EDBusSourceWritableIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceWritableProxy, e_dbus_source_writable_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (EDBusSourceWritableProxy)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_WRITABLE, e_dbus_source_writable_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceWritableProxy, e_dbus_source_writable_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_WRITABLE, e_dbus_source_writable_proxy_iface_init))

#endif
static void
e_dbus_source_writable_proxy_finalize (GObject *object)
{
  EDBusSourceWritableProxy *proxy = E_DBUS_SOURCE_WRITABLE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (e_dbus_source_writable_proxy_parent_class)->finalize (object);
}

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

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

static void
e_dbus_source_writable_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_writable_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], E_DBUS_TYPE_SOURCE_WRITABLE);
  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, E_DBUS_TYPE_SOURCE_WRITABLE);
  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
e_dbus_source_writable_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  EDBusSourceWritableProxy *proxy = E_DBUS_SOURCE_WRITABLE_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 *) &_e_dbus_source_writable_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_writable_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
e_dbus_source_writable_proxy_init (EDBusSourceWritableProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = e_dbus_source_writable_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_WRITABLE_PROXY, EDBusSourceWritableProxyPrivate);
#endif

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

static void
e_dbus_source_writable_proxy_class_init (EDBusSourceWritableProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = e_dbus_source_writable_proxy_finalize;
  gobject_class->get_property = e_dbus_source_writable_proxy_get_property;
  gobject_class->set_property = e_dbus_source_writable_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = e_dbus_source_writable_proxy_g_signal;
  proxy_class->g_properties_changed = e_dbus_source_writable_proxy_g_properties_changed;

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

static void
e_dbus_source_writable_proxy_iface_init (EDBusSourceWritableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_writable_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_writable_proxy_new_finish() to get the result of the operation.
 *
 * See e_dbus_source_writable_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_writable_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 (E_DBUS_TYPE_SOURCE_WRITABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Writable", NULL);
}

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

/**
 * e_dbus_source_writable_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_writable_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceWritableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceWritable *
e_dbus_source_writable_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_SOURCE_WRITABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Writable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_WRITABLE (ret);
  else
    return NULL;
}


/**
 * e_dbus_source_writable_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_source_writable_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_writable_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_source_writable_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_writable_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 (E_DBUS_TYPE_SOURCE_WRITABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Writable", NULL);
}

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

/**
 * e_dbus_source_writable_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_source_writable_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_writable_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceWritableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceWritable *
e_dbus_source_writable_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 (E_DBUS_TYPE_SOURCE_WRITABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.Writable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_WRITABLE (ret);
  else
    return NULL;
}


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

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

/**
 * EDBusSourceWritableSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceWritableSkeleton.
 */

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

static void
_e_dbus_source_writable_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  EDBusSourceWritableSkeleton *skeleton = E_DBUS_SOURCE_WRITABLE_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], E_DBUS_TYPE_SOURCE_WRITABLE);
  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, E_DBUS_TYPE_SOURCE_WRITABLE);
  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 *
_e_dbus_source_writable_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  EDBusSourceWritableSkeleton *skeleton = E_DBUS_SOURCE_WRITABLE_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 *) &_e_dbus_source_writable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_e_dbus_source_writable_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  EDBusSourceWritableSkeleton *skeleton = E_DBUS_SOURCE_WRITABLE_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 *) &_e_dbus_source_writable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _e_dbus_source_writable_skeleton_vtable =
{
  _e_dbus_source_writable_skeleton_handle_method_call,
  _e_dbus_source_writable_skeleton_handle_get_property,
  _e_dbus_source_writable_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
e_dbus_source_writable_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return e_dbus_source_writable_interface_info ();
}

static GDBusInterfaceVTable *
e_dbus_source_writable_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_e_dbus_source_writable_skeleton_vtable;
}

static GVariant *
e_dbus_source_writable_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceWritableSkeleton *skeleton = E_DBUS_SOURCE_WRITABLE_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_e_dbus_source_writable_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _e_dbus_source_writable_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _e_dbus_source_writable_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _e_dbus_source_writable_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source.Writable", 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
e_dbus_source_writable_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void e_dbus_source_writable_skeleton_iface_init (EDBusSourceWritableIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceWritableSkeleton, e_dbus_source_writable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (EDBusSourceWritableSkeleton)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_WRITABLE, e_dbus_source_writable_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceWritableSkeleton, e_dbus_source_writable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_WRITABLE, e_dbus_source_writable_skeleton_iface_init))

#endif
static void
e_dbus_source_writable_skeleton_finalize (GObject *object)
{
  EDBusSourceWritableSkeleton *skeleton = E_DBUS_SOURCE_WRITABLE_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 (e_dbus_source_writable_skeleton_parent_class)->finalize (object);
}

static void
e_dbus_source_writable_skeleton_init (EDBusSourceWritableSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = e_dbus_source_writable_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_WRITABLE_SKELETON, EDBusSourceWritableSkeletonPrivate);
#endif

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

static void
e_dbus_source_writable_skeleton_class_init (EDBusSourceWritableSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = e_dbus_source_writable_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = e_dbus_source_writable_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = e_dbus_source_writable_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = e_dbus_source_writable_skeleton_dbus_interface_get_vtable;

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

static void
e_dbus_source_writable_skeleton_iface_init (EDBusSourceWritableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_writable_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link>.
 *
 * Returns: (transfer full) (type EDBusSourceWritableSkeleton): The skeleton object.
 */
EDBusSourceWritable *
e_dbus_source_writable_skeleton_new (void)
{
  return E_DBUS_SOURCE_WRITABLE (g_object_new (E_DBUS_TYPE_SOURCE_WRITABLE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.evolution.dataserver.Source.RemoteCreatable
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.evolution.dataserver.Source.RemoteCreatable ---- */

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

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

static const GDBusArgInfo * const _e_dbus_source_remote_creatable_method_info_create_IN_ARG_pointers[] =
{
  &_e_dbus_source_remote_creatable_method_info_create_IN_ARG_uid.parent_struct,
  &_e_dbus_source_remote_creatable_method_info_create_IN_ARG_data.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_remote_creatable_method_info_create =
{
  {
    -1,
    (gchar *) "Create",
    (GDBusArgInfo **) &_e_dbus_source_remote_creatable_method_info_create_IN_ARG_pointers,
    NULL,
    NULL
  },
  "handle-create",
  FALSE
};

static const GDBusMethodInfo * const _e_dbus_source_remote_creatable_method_info_pointers[] =
{
  &_e_dbus_source_remote_creatable_method_info_create.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _e_dbus_source_remote_creatable_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.evolution.dataserver.Source.RemoteCreatable",
    (GDBusMethodInfo **) &_e_dbus_source_remote_creatable_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "source-remote-creatable",
};


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

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



/**
 * EDBusSourceRemoteCreatable:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>.
 */

/**
 * EDBusSourceRemoteCreatableIface:
 * @parent_iface: The parent interface.
 * @handle_create: Handler for the #EDBusSourceRemoteCreatable::handle-create signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>.
 */

typedef EDBusSourceRemoteCreatableIface EDBusSourceRemoteCreatableInterface;
G_DEFINE_INTERFACE (EDBusSourceRemoteCreatable, e_dbus_source_remote_creatable, G_TYPE_OBJECT)

static void
e_dbus_source_remote_creatable_default_init (EDBusSourceRemoteCreatableIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * EDBusSourceRemoteCreatable::handle-create:
   * @object: A #EDBusSourceRemoteCreatable.
   * @invocation: A #GDBusMethodInvocation.
   * @arg_uid: Argument passed by remote caller.
   * @arg_data: Argument passed by remote caller.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</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 e_dbus_source_remote_creatable_complete_create() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-create",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceRemoteCreatableIface, handle_create),
    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);

}

/**
 * e_dbus_source_remote_creatable_call_create:
 * @proxy: A #EDBusSourceRemoteCreatableProxy.
 * @arg_uid: Argument to pass with the method invocation.
 * @arg_data: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_remote_creatable_call_create_finish() to get the result of the operation.
 *
 * See e_dbus_source_remote_creatable_call_create_sync() for the synchronous, blocking version of this method.
 */
void
e_dbus_source_remote_creatable_call_create (
    EDBusSourceRemoteCreatable *proxy,
    const gchar *arg_uid,
    const gchar *arg_data,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "Create",
    g_variant_new ("(ss)",
                   arg_uid,
                   arg_data),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * e_dbus_source_remote_creatable_call_create_sync:
 * @proxy: A #EDBusSourceRemoteCreatableProxy.
 * @arg_uid: Argument to pass with the method invocation.
 * @arg_data: Argument to pass with the method invocation.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_remote_creatable_call_create() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
e_dbus_source_remote_creatable_call_create_sync (
    EDBusSourceRemoteCreatable *proxy,
    const gchar *arg_uid,
    const gchar *arg_data,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "Create",
    g_variant_new ("(ss)",
                   arg_uid,
                   arg_data),
    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;
}

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

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

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

/**
 * EDBusSourceRemoteCreatableProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceRemoteCreatableProxy.
 */

struct _EDBusSourceRemoteCreatableProxyPrivate
{
  GData *qdata;
};

static void e_dbus_source_remote_creatable_proxy_iface_init (EDBusSourceRemoteCreatableIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteCreatableProxy, e_dbus_source_remote_creatable_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (EDBusSourceRemoteCreatableProxy)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, e_dbus_source_remote_creatable_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteCreatableProxy, e_dbus_source_remote_creatable_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, e_dbus_source_remote_creatable_proxy_iface_init))

#endif
static void
e_dbus_source_remote_creatable_proxy_finalize (GObject *object)
{
  EDBusSourceRemoteCreatableProxy *proxy = E_DBUS_SOURCE_REMOTE_CREATABLE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (e_dbus_source_remote_creatable_proxy_parent_class)->finalize (object);
}

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

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

static void
e_dbus_source_remote_creatable_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
  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, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
  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
e_dbus_source_remote_creatable_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  EDBusSourceRemoteCreatableProxy *proxy = E_DBUS_SOURCE_REMOTE_CREATABLE_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 *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
e_dbus_source_remote_creatable_proxy_init (EDBusSourceRemoteCreatableProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = e_dbus_source_remote_creatable_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, EDBusSourceRemoteCreatableProxyPrivate);
#endif

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

static void
e_dbus_source_remote_creatable_proxy_class_init (EDBusSourceRemoteCreatableProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = e_dbus_source_remote_creatable_proxy_finalize;
  gobject_class->get_property = e_dbus_source_remote_creatable_proxy_get_property;
  gobject_class->set_property = e_dbus_source_remote_creatable_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = e_dbus_source_remote_creatable_proxy_g_signal;
  proxy_class->g_properties_changed = e_dbus_source_remote_creatable_proxy_g_properties_changed;

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

static void
e_dbus_source_remote_creatable_proxy_iface_init (EDBusSourceRemoteCreatableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_remote_creatable_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_remote_creatable_proxy_new_finish() to get the result of the operation.
 *
 * See e_dbus_source_remote_creatable_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_remote_creatable_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 (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
}

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

/**
 * e_dbus_source_remote_creatable_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_remote_creatable_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceRemoteCreatableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceRemoteCreatable *
e_dbus_source_remote_creatable_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_REMOTE_CREATABLE (ret);
  else
    return NULL;
}


/**
 * e_dbus_source_remote_creatable_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_source_remote_creatable_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_remote_creatable_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_source_remote_creatable_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_remote_creatable_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 (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
}

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

/**
 * e_dbus_source_remote_creatable_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_source_remote_creatable_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_remote_creatable_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceRemoteCreatableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceRemoteCreatable *
e_dbus_source_remote_creatable_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 (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_REMOTE_CREATABLE (ret);
  else
    return NULL;
}


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

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

/**
 * EDBusSourceRemoteCreatableSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceRemoteCreatableSkeleton.
 */

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

static void
_e_dbus_source_remote_creatable_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
  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, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
  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 *
_e_dbus_source_remote_creatable_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_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 *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_e_dbus_source_remote_creatable_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_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 *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _e_dbus_source_remote_creatable_skeleton_vtable =
{
  _e_dbus_source_remote_creatable_skeleton_handle_method_call,
  _e_dbus_source_remote_creatable_skeleton_handle_get_property,
  _e_dbus_source_remote_creatable_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
e_dbus_source_remote_creatable_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return e_dbus_source_remote_creatable_interface_info ();
}

static GDBusInterfaceVTable *
e_dbus_source_remote_creatable_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_e_dbus_source_remote_creatable_skeleton_vtable;
}

static GVariant *
e_dbus_source_remote_creatable_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_e_dbus_source_remote_creatable_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _e_dbus_source_remote_creatable_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _e_dbus_source_remote_creatable_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _e_dbus_source_remote_creatable_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source.RemoteCreatable", 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
e_dbus_source_remote_creatable_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void e_dbus_source_remote_creatable_skeleton_iface_init (EDBusSourceRemoteCreatableIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteCreatableSkeleton, e_dbus_source_remote_creatable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (EDBusSourceRemoteCreatableSkeleton)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, e_dbus_source_remote_creatable_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteCreatableSkeleton, e_dbus_source_remote_creatable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, e_dbus_source_remote_creatable_skeleton_iface_init))

#endif
static void
e_dbus_source_remote_creatable_skeleton_finalize (GObject *object)
{
  EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_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 (e_dbus_source_remote_creatable_skeleton_parent_class)->finalize (object);
}

static void
e_dbus_source_remote_creatable_skeleton_init (EDBusSourceRemoteCreatableSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = e_dbus_source_remote_creatable_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_SKELETON, EDBusSourceRemoteCreatableSkeletonPrivate);
#endif

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

static void
e_dbus_source_remote_creatable_skeleton_class_init (EDBusSourceRemoteCreatableSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = e_dbus_source_remote_creatable_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = e_dbus_source_remote_creatable_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = e_dbus_source_remote_creatable_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = e_dbus_source_remote_creatable_skeleton_dbus_interface_get_vtable;

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

static void
e_dbus_source_remote_creatable_skeleton_iface_init (EDBusSourceRemoteCreatableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_remote_creatable_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>.
 *
 * Returns: (transfer full) (type EDBusSourceRemoteCreatableSkeleton): The skeleton object.
 */
EDBusSourceRemoteCreatable *
e_dbus_source_remote_creatable_skeleton_new (void)
{
  return E_DBUS_SOURCE_REMOTE_CREATABLE (g_object_new (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.evolution.dataserver.Source.RemoteDeletable
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.evolution.dataserver.Source.RemoteDeletable ---- */

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

static const GDBusMethodInfo * const _e_dbus_source_remote_deletable_method_info_pointers[] =
{
  &_e_dbus_source_remote_deletable_method_info_delete.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _e_dbus_source_remote_deletable_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.evolution.dataserver.Source.RemoteDeletable",
    (GDBusMethodInfo **) &_e_dbus_source_remote_deletable_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "source-remote-deletable",
};


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

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



/**
 * EDBusSourceRemoteDeletable:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>.
 */

/**
 * EDBusSourceRemoteDeletableIface:
 * @parent_iface: The parent interface.
 * @handle_delete: Handler for the #EDBusSourceRemoteDeletable::handle-delete signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>.
 */

typedef EDBusSourceRemoteDeletableIface EDBusSourceRemoteDeletableInterface;
G_DEFINE_INTERFACE (EDBusSourceRemoteDeletable, e_dbus_source_remote_deletable, G_TYPE_OBJECT)

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

}

/**
 * e_dbus_source_remote_deletable_call_delete:
 * @proxy: A #EDBusSourceRemoteDeletableProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteDeletable.Delete">Delete()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_remote_deletable_call_delete_finish() to get the result of the operation.
 *
 * See e_dbus_source_remote_deletable_call_delete_sync() for the synchronous, blocking version of this method.
 */
void
e_dbus_source_remote_deletable_call_delete (
    EDBusSourceRemoteDeletable *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);
}

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

/**
 * e_dbus_source_remote_deletable_call_delete_sync:
 * @proxy: A #EDBusSourceRemoteDeletableProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteDeletable.Delete">Delete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_remote_deletable_call_delete() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
e_dbus_source_remote_deletable_call_delete_sync (
    EDBusSourceRemoteDeletable *proxy,
    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,
                 "()");
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

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

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

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

/**
 * EDBusSourceRemoteDeletableProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceRemoteDeletableProxy.
 */

struct _EDBusSourceRemoteDeletableProxyPrivate
{
  GData *qdata;
};

static void e_dbus_source_remote_deletable_proxy_iface_init (EDBusSourceRemoteDeletableIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteDeletableProxy, e_dbus_source_remote_deletable_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (EDBusSourceRemoteDeletableProxy)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, e_dbus_source_remote_deletable_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteDeletableProxy, e_dbus_source_remote_deletable_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, e_dbus_source_remote_deletable_proxy_iface_init))

#endif
static void
e_dbus_source_remote_deletable_proxy_finalize (GObject *object)
{
  EDBusSourceRemoteDeletableProxy *proxy = E_DBUS_SOURCE_REMOTE_DELETABLE_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (e_dbus_source_remote_deletable_proxy_parent_class)->finalize (object);
}

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

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

static void
e_dbus_source_remote_deletable_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
  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, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
  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
e_dbus_source_remote_deletable_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  EDBusSourceRemoteDeletableProxy *proxy = E_DBUS_SOURCE_REMOTE_DELETABLE_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 *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
e_dbus_source_remote_deletable_proxy_init (EDBusSourceRemoteDeletableProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = e_dbus_source_remote_deletable_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, EDBusSourceRemoteDeletableProxyPrivate);
#endif

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

static void
e_dbus_source_remote_deletable_proxy_class_init (EDBusSourceRemoteDeletableProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = e_dbus_source_remote_deletable_proxy_finalize;
  gobject_class->get_property = e_dbus_source_remote_deletable_proxy_get_property;
  gobject_class->set_property = e_dbus_source_remote_deletable_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = e_dbus_source_remote_deletable_proxy_g_signal;
  proxy_class->g_properties_changed = e_dbus_source_remote_deletable_proxy_g_properties_changed;

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

static void
e_dbus_source_remote_deletable_proxy_iface_init (EDBusSourceRemoteDeletableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_remote_deletable_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_remote_deletable_proxy_new_finish() to get the result of the operation.
 *
 * See e_dbus_source_remote_deletable_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_remote_deletable_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 (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
}

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

/**
 * e_dbus_source_remote_deletable_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_remote_deletable_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceRemoteDeletableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceRemoteDeletable *
e_dbus_source_remote_deletable_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_REMOTE_DELETABLE (ret);
  else
    return NULL;
}


/**
 * e_dbus_source_remote_deletable_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_source_remote_deletable_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_remote_deletable_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_source_remote_deletable_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_remote_deletable_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 (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
}

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

/**
 * e_dbus_source_remote_deletable_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_source_remote_deletable_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_remote_deletable_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceRemoteDeletableProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceRemoteDeletable *
e_dbus_source_remote_deletable_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 (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_REMOTE_DELETABLE (ret);
  else
    return NULL;
}


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

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

/**
 * EDBusSourceRemoteDeletableSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceRemoteDeletableSkeleton.
 */

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

static void
_e_dbus_source_remote_deletable_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
  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, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
  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 *
_e_dbus_source_remote_deletable_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_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 *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_e_dbus_source_remote_deletable_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_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 *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _e_dbus_source_remote_deletable_skeleton_vtable =
{
  _e_dbus_source_remote_deletable_skeleton_handle_method_call,
  _e_dbus_source_remote_deletable_skeleton_handle_get_property,
  _e_dbus_source_remote_deletable_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
e_dbus_source_remote_deletable_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return e_dbus_source_remote_deletable_interface_info ();
}

static GDBusInterfaceVTable *
e_dbus_source_remote_deletable_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_e_dbus_source_remote_deletable_skeleton_vtable;
}

static GVariant *
e_dbus_source_remote_deletable_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_e_dbus_source_remote_deletable_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _e_dbus_source_remote_deletable_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _e_dbus_source_remote_deletable_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _e_dbus_source_remote_deletable_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source.RemoteDeletable", 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
e_dbus_source_remote_deletable_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void e_dbus_source_remote_deletable_skeleton_iface_init (EDBusSourceRemoteDeletableIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteDeletableSkeleton, e_dbus_source_remote_deletable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (EDBusSourceRemoteDeletableSkeleton)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, e_dbus_source_remote_deletable_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteDeletableSkeleton, e_dbus_source_remote_deletable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, e_dbus_source_remote_deletable_skeleton_iface_init))

#endif
static void
e_dbus_source_remote_deletable_skeleton_finalize (GObject *object)
{
  EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_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 (e_dbus_source_remote_deletable_skeleton_parent_class)->finalize (object);
}

static void
e_dbus_source_remote_deletable_skeleton_init (EDBusSourceRemoteDeletableSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = e_dbus_source_remote_deletable_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_SKELETON, EDBusSourceRemoteDeletableSkeletonPrivate);
#endif

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

static void
e_dbus_source_remote_deletable_skeleton_class_init (EDBusSourceRemoteDeletableSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = e_dbus_source_remote_deletable_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = e_dbus_source_remote_deletable_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = e_dbus_source_remote_deletable_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = e_dbus_source_remote_deletable_skeleton_dbus_interface_get_vtable;

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

static void
e_dbus_source_remote_deletable_skeleton_iface_init (EDBusSourceRemoteDeletableIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_remote_deletable_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>.
 *
 * Returns: (transfer full) (type EDBusSourceRemoteDeletableSkeleton): The skeleton object.
 */
EDBusSourceRemoteDeletable *
e_dbus_source_remote_deletable_skeleton_new (void)
{
  return E_DBUS_SOURCE_REMOTE_DELETABLE (g_object_new (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_SKELETON, NULL));
}

/* ------------------------------------------------------------------------
 * Code for interface org.gnome.evolution.dataserver.Source.OAuth2Support
 * ------------------------------------------------------------------------
 */

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

/* ---- Introspection data for org.gnome.evolution.dataserver.Source.OAuth2Support ---- */

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

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

static const GDBusArgInfo * const _e_dbus_source_oauth2_support_method_info_get_access_token_OUT_ARG_pointers[] =
{
  &_e_dbus_source_oauth2_support_method_info_get_access_token_OUT_ARG_access_token.parent_struct,
  &_e_dbus_source_oauth2_support_method_info_get_access_token_OUT_ARG_expires_in.parent_struct,
  NULL
};

static const _ExtendedGDBusMethodInfo _e_dbus_source_oauth2_support_method_info_get_access_token =
{
  {
    -1,
    (gchar *) "GetAccessToken",
    NULL,
    (GDBusArgInfo **) &_e_dbus_source_oauth2_support_method_info_get_access_token_OUT_ARG_pointers,
    NULL
  },
  "handle-get-access-token",
  FALSE
};

static const GDBusMethodInfo * const _e_dbus_source_oauth2_support_method_info_pointers[] =
{
  &_e_dbus_source_oauth2_support_method_info_get_access_token.parent_struct,
  NULL
};

static const _ExtendedGDBusInterfaceInfo _e_dbus_source_oauth2_support_interface_info =
{
  {
    -1,
    (gchar *) "org.gnome.evolution.dataserver.Source.OAuth2Support",
    (GDBusMethodInfo **) &_e_dbus_source_oauth2_support_method_info_pointers,
    NULL,
    NULL,
    NULL
  },
  "source-oauth2-support",
};


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

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



/**
 * EDBusSourceOAuth2Support:
 *
 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link>.
 */

/**
 * EDBusSourceOAuth2SupportIface:
 * @parent_iface: The parent interface.
 * @handle_get_access_token: Handler for the #EDBusSourceOAuth2Support::handle-get-access-token signal.
 *
 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link>.
 */

typedef EDBusSourceOAuth2SupportIface EDBusSourceOAuth2SupportInterface;
G_DEFINE_INTERFACE (EDBusSourceOAuth2Support, e_dbus_source_oauth2_support, G_TYPE_OBJECT)

static void
e_dbus_source_oauth2_support_default_init (EDBusSourceOAuth2SupportIface *iface)
{
  /* GObject signals for incoming D-Bus method calls: */
  /**
   * EDBusSourceOAuth2Support::handle-get-access-token:
   * @object: A #EDBusSourceOAuth2Support.
   * @invocation: A #GDBusMethodInvocation.
   *
   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-OAuth2Support.GetAccessToken">GetAccessToken()</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 e_dbus_source_oauth2_support_complete_get_access_token() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
   *
   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
   */
  g_signal_new ("handle-get-access-token",
    G_TYPE_FROM_INTERFACE (iface),
    G_SIGNAL_RUN_LAST,
    G_STRUCT_OFFSET (EDBusSourceOAuth2SupportIface, handle_get_access_token),
    g_signal_accumulator_true_handled,
    NULL,
    g_cclosure_marshal_generic,
    G_TYPE_BOOLEAN,
    1,
    G_TYPE_DBUS_METHOD_INVOCATION);

}

/**
 * e_dbus_source_oauth2_support_call_get_access_token:
 * @proxy: A #EDBusSourceOAuth2SupportProxy.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-OAuth2Support.GetAccessToken">GetAccessToken()</link> D-Bus method on @proxy.
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_oauth2_support_call_get_access_token_finish() to get the result of the operation.
 *
 * See e_dbus_source_oauth2_support_call_get_access_token_sync() for the synchronous, blocking version of this method.
 */
void
e_dbus_source_oauth2_support_call_get_access_token (
    EDBusSourceOAuth2Support *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data)
{
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
    "GetAccessToken",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    callback,
    user_data);
}

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

/**
 * e_dbus_source_oauth2_support_call_get_access_token_sync:
 * @proxy: A #EDBusSourceOAuth2SupportProxy.
 * @out_access_token: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @out_expires_in: (out) (optional): Return location for return parameter or %NULL to ignore.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-OAuth2Support.GetAccessToken">GetAccessToken()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_oauth2_support_call_get_access_token() for the asynchronous version of this method.
 *
 * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean
e_dbus_source_oauth2_support_call_get_access_token_sync (
    EDBusSourceOAuth2Support *proxy,
    gchar **out_access_token,
    gint *out_expires_in,
    GCancellable *cancellable,
    GError **error)
{
  GVariant *_ret;
  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
    "GetAccessToken",
    g_variant_new ("()"),
    G_DBUS_CALL_FLAGS_NONE,
    -1,
    cancellable,
    error);
  if (_ret == NULL)
    goto _out;
  g_variant_get (_ret,
                 "(si)",
                 out_access_token,
                 out_expires_in);
  g_variant_unref (_ret);
_out:
  return _ret != NULL;
}

/**
 * e_dbus_source_oauth2_support_complete_get_access_token:
 * @object: A #EDBusSourceOAuth2Support.
 * @invocation: (transfer full): A #GDBusMethodInvocation.
 * @access_token: Parameter to return.
 * @expires_in: Parameter to return.
 *
 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-OAuth2Support.GetAccessToken">GetAccessToken()</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
e_dbus_source_oauth2_support_complete_get_access_token (
    EDBusSourceOAuth2Support *object G_GNUC_UNUSED,
    GDBusMethodInvocation *invocation,
    const gchar *access_token,
    gint expires_in)
{
  g_dbus_method_invocation_return_value (invocation,
    g_variant_new ("(si)",
                   access_token,
                   expires_in));
}

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

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

/**
 * EDBusSourceOAuth2SupportProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceOAuth2SupportProxy.
 */

struct _EDBusSourceOAuth2SupportProxyPrivate
{
  GData *qdata;
};

static void e_dbus_source_oauth2_support_proxy_iface_init (EDBusSourceOAuth2SupportIface *iface);

#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceOAuth2SupportProxy, e_dbus_source_oauth2_support_proxy, G_TYPE_DBUS_PROXY,
                         G_ADD_PRIVATE (EDBusSourceOAuth2SupportProxy)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT, e_dbus_source_oauth2_support_proxy_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceOAuth2SupportProxy, e_dbus_source_oauth2_support_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT, e_dbus_source_oauth2_support_proxy_iface_init))

#endif
static void
e_dbus_source_oauth2_support_proxy_finalize (GObject *object)
{
  EDBusSourceOAuth2SupportProxy *proxy = E_DBUS_SOURCE_OAUTH2_SUPPORT_PROXY (object);
  g_datalist_clear (&proxy->priv->qdata);
  G_OBJECT_CLASS (e_dbus_source_oauth2_support_proxy_parent_class)->finalize (object);
}

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

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

static void
e_dbus_source_oauth2_support_proxy_g_signal (GDBusProxy *proxy,
  const gchar *sender_name G_GNUC_UNUSED,
  const gchar *signal_name,
  GVariant *parameters)
{
  _ExtendedGDBusSignalInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  gsize n;
  guint signal_id;
  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_oauth2_support_interface_info.parent_struct, signal_name);
  if (info == NULL)
    return;
  num_params = g_variant_n_children (parameters);
  paramv = g_new0 (GValue, num_params + 1);
  g_value_init (&paramv[0], E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT);
  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, E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT);
  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
e_dbus_source_oauth2_support_proxy_g_properties_changed (GDBusProxy *_proxy,
  GVariant *changed_properties,
  const gchar *const *invalidated_properties)
{
  EDBusSourceOAuth2SupportProxy *proxy = E_DBUS_SOURCE_OAUTH2_SUPPORT_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 *) &_e_dbus_source_oauth2_support_interface_info.parent_struct, key);
      g_datalist_remove_data (&proxy->priv->qdata, key);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
  g_variant_iter_free (iter);
  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_oauth2_support_interface_info.parent_struct, invalidated_properties[n]);
      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
      if (info != NULL)
        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
    }
}

static void
e_dbus_source_oauth2_support_proxy_init (EDBusSourceOAuth2SupportProxy *proxy)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  proxy->priv = e_dbus_source_oauth2_support_proxy_get_instance_private (proxy);
#else
  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_PROXY, EDBusSourceOAuth2SupportProxyPrivate);
#endif

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

static void
e_dbus_source_oauth2_support_proxy_class_init (EDBusSourceOAuth2SupportProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = e_dbus_source_oauth2_support_proxy_finalize;
  gobject_class->get_property = e_dbus_source_oauth2_support_proxy_get_property;
  gobject_class->set_property = e_dbus_source_oauth2_support_proxy_set_property;

  proxy_class = G_DBUS_PROXY_CLASS (klass);
  proxy_class->g_signal = e_dbus_source_oauth2_support_proxy_g_signal;
  proxy_class->g_properties_changed = e_dbus_source_oauth2_support_proxy_g_properties_changed;

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

static void
e_dbus_source_oauth2_support_proxy_iface_init (EDBusSourceOAuth2SupportIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_oauth2_support_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link>. See g_dbus_proxy_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_oauth2_support_proxy_new_finish() to get the result of the operation.
 *
 * See e_dbus_source_oauth2_support_proxy_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_oauth2_support_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 (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.OAuth2Support", NULL);
}

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

/**
 * e_dbus_source_oauth2_support_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link>. See g_dbus_proxy_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_oauth2_support_proxy_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceOAuth2SupportProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceOAuth2Support *
e_dbus_source_oauth2_support_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.OAuth2Support", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_OAUTH2_SUPPORT (ret);
  else
    return NULL;
}


/**
 * e_dbus_source_oauth2_support_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_source_oauth2_support_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_source_oauth2_support_proxy_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_source_oauth2_support_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_source_oauth2_support_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 (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.OAuth2Support", NULL);
}

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

/**
 * e_dbus_source_oauth2_support_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusProxyFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_source_oauth2_support_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_source_oauth2_support_proxy_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusSourceOAuth2SupportProxy): The constructed proxy object or %NULL if @error is set.
 */
EDBusSourceOAuth2Support *
e_dbus_source_oauth2_support_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 (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.OAuth2Support", NULL);
  if (ret != NULL)
    return E_DBUS_SOURCE_OAUTH2_SUPPORT (ret);
  else
    return NULL;
}


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

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

/**
 * EDBusSourceOAuth2SupportSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusSourceOAuth2SupportSkeleton.
 */

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

static void
_e_dbus_source_oauth2_support_skeleton_handle_method_call (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name,
  const gchar *method_name,
  GVariant *parameters,
  GDBusMethodInvocation *invocation,
  gpointer user_data)
{
  EDBusSourceOAuth2SupportSkeleton *skeleton = E_DBUS_SOURCE_OAUTH2_SUPPORT_SKELETON (user_data);
  _ExtendedGDBusMethodInfo *info;
  GVariantIter iter;
  GVariant *child;
  GValue *paramv;
  gsize num_params;
  guint num_extra;
  gsize n;
  guint signal_id;
  GValue return_value = G_VALUE_INIT;
  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  g_assert (info != NULL);
  num_params = g_variant_n_children (parameters);
  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  n = 0;
  g_value_init (&paramv[n], E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT);
  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, E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT);
  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 *
_e_dbus_source_oauth2_support_skeleton_handle_get_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GError **error,
  gpointer user_data)
{
  EDBusSourceOAuth2SupportSkeleton *skeleton = E_DBUS_SOURCE_OAUTH2_SUPPORT_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 *) &_e_dbus_source_oauth2_support_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      g_value_init (&value, pspec->value_type);
      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
      g_value_unset (&value);
    }
  return ret;
}

static gboolean
_e_dbus_source_oauth2_support_skeleton_handle_set_property (
  GDBusConnection *connection G_GNUC_UNUSED,
  const gchar *sender G_GNUC_UNUSED,
  const gchar *object_path G_GNUC_UNUSED,
  const gchar *interface_name G_GNUC_UNUSED,
  const gchar *property_name,
  GVariant *variant,
  GError **error,
  gpointer user_data)
{
  EDBusSourceOAuth2SupportSkeleton *skeleton = E_DBUS_SOURCE_OAUTH2_SUPPORT_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 *) &_e_dbus_source_oauth2_support_interface_info.parent_struct, property_name);
  g_assert (info != NULL);
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  if (pspec == NULL)
    {
      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
    }
  else
    {
      if (info->use_gvariant)
        g_value_set_variant (&value, variant);
      else
        g_dbus_gvariant_to_gvalue (variant, &value);
      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
      g_value_unset (&value);
      ret = TRUE;
    }
  return ret;
}

static const GDBusInterfaceVTable _e_dbus_source_oauth2_support_skeleton_vtable =
{
  _e_dbus_source_oauth2_support_skeleton_handle_method_call,
  _e_dbus_source_oauth2_support_skeleton_handle_get_property,
  _e_dbus_source_oauth2_support_skeleton_handle_set_property,
  {NULL}
};

static GDBusInterfaceInfo *
e_dbus_source_oauth2_support_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return e_dbus_source_oauth2_support_interface_info ();
}

static GDBusInterfaceVTable *
e_dbus_source_oauth2_support_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
{
  return (GDBusInterfaceVTable *) &_e_dbus_source_oauth2_support_skeleton_vtable;
}

static GVariant *
e_dbus_source_oauth2_support_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
{
  EDBusSourceOAuth2SupportSkeleton *skeleton = E_DBUS_SOURCE_OAUTH2_SUPPORT_SKELETON (_skeleton);

  GVariantBuilder builder;
  guint n;
  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  if (_e_dbus_source_oauth2_support_interface_info.parent_struct.properties == NULL)
    goto out;
  for (n = 0; _e_dbus_source_oauth2_support_interface_info.parent_struct.properties[n] != NULL; n++)
    {
      GDBusPropertyInfo *info = _e_dbus_source_oauth2_support_interface_info.parent_struct.properties[n];
      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
        {
          GVariant *value;
          value = _e_dbus_source_oauth2_support_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.gnome.evolution.dataserver.Source.OAuth2Support", 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
e_dbus_source_oauth2_support_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
{
}

static void e_dbus_source_oauth2_support_skeleton_iface_init (EDBusSourceOAuth2SupportIface *iface);
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE (EDBusSourceOAuth2SupportSkeleton, e_dbus_source_oauth2_support_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_ADD_PRIVATE (EDBusSourceOAuth2SupportSkeleton)
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT, e_dbus_source_oauth2_support_skeleton_iface_init))

#else
G_DEFINE_TYPE_WITH_CODE (EDBusSourceOAuth2SupportSkeleton, e_dbus_source_oauth2_support_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT, e_dbus_source_oauth2_support_skeleton_iface_init))

#endif
static void
e_dbus_source_oauth2_support_skeleton_finalize (GObject *object)
{
  EDBusSourceOAuth2SupportSkeleton *skeleton = E_DBUS_SOURCE_OAUTH2_SUPPORT_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 (e_dbus_source_oauth2_support_skeleton_parent_class)->finalize (object);
}

static void
e_dbus_source_oauth2_support_skeleton_init (EDBusSourceOAuth2SupportSkeleton *skeleton)
{
#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
  skeleton->priv = e_dbus_source_oauth2_support_skeleton_get_instance_private (skeleton);
#else
  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_SKELETON, EDBusSourceOAuth2SupportSkeletonPrivate);
#endif

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

static void
e_dbus_source_oauth2_support_skeleton_class_init (EDBusSourceOAuth2SupportSkeletonClass *klass)
{
  GObjectClass *gobject_class;
  GDBusInterfaceSkeletonClass *skeleton_class;

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

  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  skeleton_class->get_info = e_dbus_source_oauth2_support_skeleton_dbus_interface_get_info;
  skeleton_class->get_properties = e_dbus_source_oauth2_support_skeleton_dbus_interface_get_properties;
  skeleton_class->flush = e_dbus_source_oauth2_support_skeleton_dbus_interface_flush;
  skeleton_class->get_vtable = e_dbus_source_oauth2_support_skeleton_dbus_interface_get_vtable;

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

static void
e_dbus_source_oauth2_support_skeleton_iface_init (EDBusSourceOAuth2SupportIface *iface G_GNUC_UNUSED)
{
}

/**
 * e_dbus_source_oauth2_support_skeleton_new:
 *
 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link>.
 *
 * Returns: (transfer full) (type EDBusSourceOAuth2SupportSkeleton): The skeleton object.
 */
EDBusSourceOAuth2Support *
e_dbus_source_oauth2_support_skeleton_new (void)
{
  return E_DBUS_SOURCE_OAUTH2_SUPPORT (g_object_new (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_SKELETON, NULL));
}

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

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

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

/**
 * EDBusObjectIface:
 * @parent_iface: The parent interface.
 *
 * Virtual table for the #EDBusObject interface.
 */

typedef EDBusObjectIface EDBusObjectInterface;
G_DEFINE_INTERFACE_WITH_CODE (EDBusObject, e_dbus_object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT);)

static void
e_dbus_object_default_init (EDBusObjectIface *iface)
{
  /**
   * EDBusObject:source:
   *
   * The #EDBusSource instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("source", "source", "source", E_DBUS_TYPE_SOURCE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * EDBusObject:source-removable:
   *
   * The #EDBusSourceRemovable instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("source-removable", "source-removable", "source-removable", E_DBUS_TYPE_SOURCE_REMOVABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * EDBusObject:source-writable:
   *
   * The #EDBusSourceWritable instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("source-writable", "source-writable", "source-writable", E_DBUS_TYPE_SOURCE_WRITABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * EDBusObject:source-remote-creatable:
   *
   * The #EDBusSourceRemoteCreatable instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("source-remote-creatable", "source-remote-creatable", "source-remote-creatable", E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * EDBusObject:source-remote-deletable:
   *
   * The #EDBusSourceRemoteDeletable instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("source-remote-deletable", "source-remote-deletable", "source-remote-deletable", E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * EDBusObject:source-oauth2-support:
   *
   * The #EDBusSourceOAuth2Support instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link>, if any.
   *
   * Connect to the #GObject::notify signal to get informed of property changes.
   */
  g_object_interface_install_property (iface, g_param_spec_object ("source-oauth2-support", "source-oauth2-support", "source-oauth2-support", E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

}

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

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

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

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

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

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


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

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

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

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

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

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


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

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

/**
 * EDBusObjectProxyClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusObjectProxy.
 */

static void
e_dbus_object_proxy__e_dbus_object_iface_init (EDBusObjectIface *iface G_GNUC_UNUSED)
{
}

static void
e_dbus_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface)
{
  iface->interface_added = e_dbus_object_notify;
  iface->interface_removed = e_dbus_object_notify;
}


G_DEFINE_TYPE_WITH_CODE (EDBusObjectProxy, e_dbus_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_OBJECT, e_dbus_object_proxy__e_dbus_object_iface_init)
                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, e_dbus_object_proxy__g_dbus_object_iface_init))

static void
e_dbus_object_proxy_init (EDBusObjectProxy *object G_GNUC_UNUSED)
{
}

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

static void
e_dbus_object_proxy_get_property (GObject      *gobject,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  EDBusObjectProxy *object = E_DBUS_OBJECT_PROXY (gobject);
  GDBusInterface *interface;

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

    case 2:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.Removable");
      g_value_take_object (value, interface);
      break;

    case 3:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.Writable");
      g_value_take_object (value, interface);
      break;

    case 4:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.RemoteCreatable");
      g_value_take_object (value, interface);
      break;

    case 5:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.RemoteDeletable");
      g_value_take_object (value, interface);
      break;

    case 6:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.OAuth2Support");
      g_value_take_object (value, interface);
      break;

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

static void
e_dbus_object_proxy_class_init (EDBusObjectProxyClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->set_property = e_dbus_object_proxy_set_property;
  gobject_class->get_property = e_dbus_object_proxy_get_property;

  g_object_class_override_property (gobject_class, 1, "source");
  g_object_class_override_property (gobject_class, 2, "source-removable");
  g_object_class_override_property (gobject_class, 3, "source-writable");
  g_object_class_override_property (gobject_class, 4, "source-remote-creatable");
  g_object_class_override_property (gobject_class, 5, "source-remote-deletable");
  g_object_class_override_property (gobject_class, 6, "source-oauth2-support");
}

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

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

/**
 * EDBusObjectSkeletonClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusObjectSkeleton.
 */

static void
e_dbus_object_skeleton__e_dbus_object_iface_init (EDBusObjectIface *iface G_GNUC_UNUSED)
{
}


static void
e_dbus_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface)
{
  iface->interface_added = e_dbus_object_notify;
  iface->interface_removed = e_dbus_object_notify;
}

G_DEFINE_TYPE_WITH_CODE (EDBusObjectSkeleton, e_dbus_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
                         G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_OBJECT, e_dbus_object_skeleton__e_dbus_object_iface_init)
                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, e_dbus_object_skeleton__g_dbus_object_iface_init))

static void
e_dbus_object_skeleton_init (EDBusObjectSkeleton *object G_GNUC_UNUSED)
{
}

static void
e_dbus_object_skeleton_set_property (GObject      *gobject,
  guint         prop_id,
  const GValue *value,
  GParamSpec   *pspec)
{
  EDBusObjectSkeleton *object = E_DBUS_OBJECT_SKELETON (gobject);
  GDBusInterfaceSkeleton *interface;

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

    case 2:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (E_DBUS_IS_SOURCE_REMOVABLE (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.evolution.dataserver.Source.Removable");
        }
      break;

    case 3:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (E_DBUS_IS_SOURCE_WRITABLE (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.evolution.dataserver.Source.Writable");
        }
      break;

    case 4:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (E_DBUS_IS_SOURCE_REMOTE_CREATABLE (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.evolution.dataserver.Source.RemoteCreatable");
        }
      break;

    case 5:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (E_DBUS_IS_SOURCE_REMOTE_DELETABLE (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.evolution.dataserver.Source.RemoteDeletable");
        }
      break;

    case 6:
      interface = g_value_get_object (value);
      if (interface != NULL)
        {
          g_warn_if_fail (E_DBUS_IS_SOURCE_OAUTH2_SUPPORT (interface));
          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
        }
      else
        {
          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.gnome.evolution.dataserver.Source.OAuth2Support");
        }
      break;

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

static void
e_dbus_object_skeleton_get_property (GObject      *gobject,
  guint         prop_id,
  GValue       *value,
  GParamSpec   *pspec)
{
  EDBusObjectSkeleton *object = E_DBUS_OBJECT_SKELETON (gobject);
  GDBusInterface *interface;

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

    case 2:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.Removable");
      g_value_take_object (value, interface);
      break;

    case 3:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.Writable");
      g_value_take_object (value, interface);
      break;

    case 4:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.RemoteCreatable");
      g_value_take_object (value, interface);
      break;

    case 5:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.RemoteDeletable");
      g_value_take_object (value, interface);
      break;

    case 6:
      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.gnome.evolution.dataserver.Source.OAuth2Support");
      g_value_take_object (value, interface);
      break;

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

static void
e_dbus_object_skeleton_class_init (EDBusObjectSkeletonClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->set_property = e_dbus_object_skeleton_set_property;
  gobject_class->get_property = e_dbus_object_skeleton_get_property;

  g_object_class_override_property (gobject_class, 1, "source");
  g_object_class_override_property (gobject_class, 2, "source-removable");
  g_object_class_override_property (gobject_class, 3, "source-writable");
  g_object_class_override_property (gobject_class, 4, "source-remote-creatable");
  g_object_class_override_property (gobject_class, 5, "source-remote-deletable");
  g_object_class_override_property (gobject_class, 6, "source-oauth2-support");
}

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

/**
 * e_dbus_object_skeleton_set_source:
 * @object: A #EDBusObjectSkeleton.
 * @interface_: (nullable): A #EDBusSource or %NULL to clear the interface.
 *
 * Sets the #EDBusSource instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source.top_of_page">org.gnome.evolution.dataserver.Source</link> on @object.
 */
void e_dbus_object_skeleton_set_source (EDBusObjectSkeleton *object, EDBusSource *interface_)
{
  g_object_set (G_OBJECT (object), "source", interface_, NULL);
}

/**
 * e_dbus_object_skeleton_set_source_removable:
 * @object: A #EDBusObjectSkeleton.
 * @interface_: (nullable): A #EDBusSourceRemovable or %NULL to clear the interface.
 *
 * Sets the #EDBusSourceRemovable instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Removable.top_of_page">org.gnome.evolution.dataserver.Source.Removable</link> on @object.
 */
void e_dbus_object_skeleton_set_source_removable (EDBusObjectSkeleton *object, EDBusSourceRemovable *interface_)
{
  g_object_set (G_OBJECT (object), "source-removable", interface_, NULL);
}

/**
 * e_dbus_object_skeleton_set_source_writable:
 * @object: A #EDBusObjectSkeleton.
 * @interface_: (nullable): A #EDBusSourceWritable or %NULL to clear the interface.
 *
 * Sets the #EDBusSourceWritable instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-Writable.top_of_page">org.gnome.evolution.dataserver.Source.Writable</link> on @object.
 */
void e_dbus_object_skeleton_set_source_writable (EDBusObjectSkeleton *object, EDBusSourceWritable *interface_)
{
  g_object_set (G_OBJECT (object), "source-writable", interface_, NULL);
}

/**
 * e_dbus_object_skeleton_set_source_remote_creatable:
 * @object: A #EDBusObjectSkeleton.
 * @interface_: (nullable): A #EDBusSourceRemoteCreatable or %NULL to clear the interface.
 *
 * Sets the #EDBusSourceRemoteCreatable instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link> on @object.
 */
void e_dbus_object_skeleton_set_source_remote_creatable (EDBusObjectSkeleton *object, EDBusSourceRemoteCreatable *interface_)
{
  g_object_set (G_OBJECT (object), "source-remote-creatable", interface_, NULL);
}

/**
 * e_dbus_object_skeleton_set_source_remote_deletable:
 * @object: A #EDBusObjectSkeleton.
 * @interface_: (nullable): A #EDBusSourceRemoteDeletable or %NULL to clear the interface.
 *
 * Sets the #EDBusSourceRemoteDeletable instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link> on @object.
 */
void e_dbus_object_skeleton_set_source_remote_deletable (EDBusObjectSkeleton *object, EDBusSourceRemoteDeletable *interface_)
{
  g_object_set (G_OBJECT (object), "source-remote-deletable", interface_, NULL);
}

/**
 * e_dbus_object_skeleton_set_source_oauth2_support:
 * @object: A #EDBusObjectSkeleton.
 * @interface_: (nullable): A #EDBusSourceOAuth2Support or %NULL to clear the interface.
 *
 * Sets the #EDBusSourceOAuth2Support instance for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-OAuth2Support.top_of_page">org.gnome.evolution.dataserver.Source.OAuth2Support</link> on @object.
 */
void e_dbus_object_skeleton_set_source_oauth2_support (EDBusObjectSkeleton *object, EDBusSourceOAuth2Support *interface_)
{
  g_object_set (G_OBJECT (object), "source-oauth2-support", interface_, NULL);
}


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

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

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

/**
 * EDBusObjectManagerClientClass:
 * @parent_class: The parent class.
 *
 * Class structure for #EDBusObjectManagerClient.
 */

G_DEFINE_TYPE (EDBusObjectManagerClient, e_dbus_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)

static void
e_dbus_object_manager_client_init (EDBusObjectManagerClient *manager G_GNUC_UNUSED)
{
}

static void
e_dbus_object_manager_client_class_init (EDBusObjectManagerClientClass *klass G_GNUC_UNUSED)
{
}

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

  if (interface_name == NULL)
    return E_DBUS_TYPE_OBJECT_PROXY;
  if (g_once_init_enter (&once_init_value))
    {
      lookup_hash = g_hash_table_new (g_str_hash, g_str_equal);
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.evolution.dataserver.Source", GSIZE_TO_POINTER (E_DBUS_TYPE_SOURCE_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.evolution.dataserver.Source.Removable", GSIZE_TO_POINTER (E_DBUS_TYPE_SOURCE_REMOVABLE_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.evolution.dataserver.Source.Writable", GSIZE_TO_POINTER (E_DBUS_TYPE_SOURCE_WRITABLE_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.evolution.dataserver.Source.RemoteCreatable", GSIZE_TO_POINTER (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.evolution.dataserver.Source.RemoteDeletable", GSIZE_TO_POINTER (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY));
      g_hash_table_insert (lookup_hash, (gpointer) "org.gnome.evolution.dataserver.Source.OAuth2Support", GSIZE_TO_POINTER (E_DBUS_TYPE_SOURCE_OAUTH2_SUPPORT_PROXY));
      g_once_init_leave (&once_init_value, 1);
    }
  ret = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (lookup_hash, interface_name));
  if (ret == (GType) 0)
    ret = G_TYPE_DBUS_PROXY;
  return ret;
}

/**
 * e_dbus_object_manager_client_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Asynchronously creates #GDBusObjectManagerClient using e_dbus_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_object_manager_client_new_finish() to get the result of the operation.
 *
 * See e_dbus_object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_object_manager_client_new (
    GDBusConnection        *connection,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GAsyncReadyCallback     callback,
    gpointer                user_data)
{
  g_async_initable_new_async (E_DBUS_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", e_dbus_object_manager_client_get_proxy_type, NULL);
}

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

/**
 * e_dbus_object_manager_client_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
 * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Synchronously creates #GDBusObjectManagerClient using e_dbus_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_object_manager_client_new() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusObjectManagerClient): The constructed object manager client or %NULL if @error is set.
 */
GDBusObjectManager *
e_dbus_object_manager_client_new_sync (
    GDBusConnection        *connection,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GError                **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", e_dbus_object_manager_client_get_proxy_type, NULL);
  if (ret != NULL)
    return G_DBUS_OBJECT_MANAGER (ret);
  else
    return NULL;
}


/**
 * e_dbus_object_manager_client_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 * @user_data: User data to pass to @callback.
 *
 * Like e_dbus_object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection.
 *
 * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
 * You can then call e_dbus_object_manager_client_new_for_bus_finish() to get the result of the operation.
 *
 * See e_dbus_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor.
 */
void
e_dbus_object_manager_client_new_for_bus (
    GBusType                bus_type,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GAsyncReadyCallback     callback,
    gpointer                user_data)
{
  g_async_initable_new_async (E_DBUS_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", e_dbus_object_manager_client_get_proxy_type, NULL);
}

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

/**
 * e_dbus_object_manager_client_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: (nullable): A #GCancellable or %NULL.
 * @error: Return location for error or %NULL
 *
 * Like e_dbus_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
 *
 * The calling thread is blocked until a reply is received.
 *
 * See e_dbus_object_manager_client_new_for_bus() for the asynchronous version of this constructor.
 *
 * Returns: (transfer full) (type EDBusObjectManagerClient): The constructed object manager client or %NULL if @error is set.
 */
GDBusObjectManager *
e_dbus_object_manager_client_new_for_bus_sync (
    GBusType                bus_type,
    GDBusObjectManagerClientFlags  flags,
    const gchar            *name,
    const gchar            *object_path,
    GCancellable           *cancellable,
    GError                **error)
{
  GInitable *ret;
  ret = g_initable_new (E_DBUS_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", e_dbus_object_manager_client_get_proxy_type, NULL);
  if (ret != NULL)
    return G_DBUS_OBJECT_MANAGER (ret);
  else
    return NULL;
}


