/* File:       test-foobar.c
 *
 * GType name: FooBar
 * D-Bus name: org.project.Bar
 *
 * Generated by GDBus Binding Tool 0.1. DO NOT EDIT.
 */

/**
 * SECTION:test-foobar
 * @title: FooBar
 * @short_description: Wraps the org.project.Bar D-Bus interface
 * @include: gio/gio.h
 *
 * The abstract #FooBar interface type wraps the <literal>org.project.Bar</literal> D-Bus interface. Two concrete implementations of this type are included: #FooBarProxy and #FooBarStub.
 *
 * The generated proxy type #FooBarProxy is typically used with the generated constructors foo_bar_proxy_new(), foo_bar_proxy_new_sync() and foo_bar_proxy_new_for_bus(), foo_bar_proxy_new_for_bus_sync().
 *
 * The generated stub type #FooBarStub takes care of handling properties, method invocations and signal emissions. Simply use foo_bar_stub_new(), set some properties and connect to any of the handle-* signals to handle method invocations. Finally use foo_bar_register_object() to export the object on a #GDBusConnection.
 * |[
 * /<!-- -->* You can also use g_object_new() with FOO_TYPE_BAR_STUB
 *  * to set properties at construction time.
 *  *<!-- -->/
 * object = foo_bar_stub_new ();
 * foo_bar_set_&lt;property_name&gt; (object, &lt;value_for_property&gt;);
 * [...]
 *
 * g_signal_connect (object,
 *                   "handle-&lt;method-name&gt;",
 *                   G_CALLBACK (on_handle_&lt;method_name&gt;),
 *                   some_user_data);
 * [...]
 *
 * error = NULL;
 * id = foo_bar_register_object (object,
 *                               connection,
 *                               "/path/of/object",
 *                               &error);
 * ]|
 *
 * You don't <emphasis>have</emphasis> to use the generated stub type to export
 * objects. Any type implementing the #FooBar interface may be used with
 * foo_bar_register_object().
 *
 * Once exported, you can make the exported object emit D-Bus signals by simply
 * emitting the corresponding GType signals. For better type-safety, you can use,
 * the provided foo_bar_emit_*() helpers.
 *
 * For property changes, #GObject::notify signal emissions on exported objects 
 * will be intercepted and queued. In an idle handler, the queued notifications
 * are processed and a single <literal>PropertiesChanged</literal> signal (on the
 * <literal>org.freedesktop.DBus.Properties</literal> interface) will be emitted
 * for all the properties that changed (possibly containing several properties).
 * Use foo_bar_drain_notify() to drain the queue immediately.
 */

#include "test-foobar.h"
#include "test-typemappers.h"
#include "test-marshallers.h"

typedef FooBarIface FooBarInterface;
G_DEFINE_INTERFACE (FooBar, foo_bar, G_TYPE_OBJECT);


enum
{
  _0_SIGNAL,
  __TEST_SIGNAL_SIGNAL,
  __ANOTHER_SIGNAL_SIGNAL,
  __HELLO_WORLD_METHOD,
  __TEST_PRIMITIVE_TYPES_METHOD,
  __TEST_NON_PRIMITIVE_TYPES_METHOD,
  __REQUEST_SIGNAL_EMISSION_METHOD,
  __REQUEST_MULTI_PROPERTY_MODS_METHOD,
  __LAST_SIGNAL
};

static guint signals[__LAST_SIGNAL] = {0};


enum
{
  PROP_0,
  PROP_Y,
  PROP_B,
  PROP_N,
  PROP_Q,
  PROP_I,
  PROP_U,
  PROP_X,
  PROP_T,
  PROP_D,
  PROP_S,
  PROP_O,
  PROP_G,
  PROP_AY,
  PROP_AS,
  PROP_AO,
  PROP_AG,
  PROP_FINALLY_NORMAL_NAME,
  PROP_READONLY_PROPERTY,
  PROP_WRITEONLY_PROPERTY,
  PROP_UNSET_I,
  PROP_UNSET_D,
  PROP_UNSET_S,
  PROP_UNSET_O,
  PROP_UNSET_G,
  PROP_UNSET_AY,
  PROP_UNSET_AS,
  PROP_UNSET_AO,
  PROP_UNSET_AG,
  PROP_UNSET_STRUCT,
};

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

/* Various lookup tables */

static GHashTable *_method_name_to_id = NULL;
static GHashTable *_signal_name_to_id = NULL;
static GHashTable *_property_name_to_id = NULL;
static GHashTable *_property_gname_to_name = NULL;
static GHashTable *_property_name_to_gname = NULL;


static guint
lookup_method_id_from_method_name (const gchar *method_name)
{
  return GPOINTER_TO_UINT (g_hash_table_lookup (_method_name_to_id, method_name));
}

static guint
lookup_signal_id_from_signal_name (const gchar *signal_name)
{
  return GPOINTER_TO_UINT (g_hash_table_lookup (_signal_name_to_id, signal_name));
}

static guint
lookup_property_id_from_property_name (const gchar *property_name)
{
  return GPOINTER_TO_UINT (g_hash_table_lookup (_property_name_to_id, property_name));
}

static const gchar *
lookup_property_name_from_property_gname (const gchar *property_gname)
{
  return g_hash_table_lookup (_property_gname_to_name, property_gname);
}

static const gchar *
lookup_property_gname_from_property_name (const gchar *property_name)
{
  return g_hash_table_lookup (_property_name_to_gname, property_name);
}

/* ------------------------------------------------------------------------- */
static gboolean
signal_emission_hook_cb_test_signal (GSignalInvocationHint *ihint,
                         guint                  n_param_values,
                         const GValue          *param_values,
                         gpointer               user_data)
{
  GObject *object;
  GDBusConnection *connection;
  const gchar *path;
  GVariant *params;
  GVariant *item;
  GVariantBuilder *builder;

  if (n_param_values < 1 || !G_VALUE_HOLDS (&param_values[0], G_TYPE_OBJECT))
    goto out;
  object = g_value_get_object (&param_values[0]);
  path = g_object_get_data (object, "gdbus-codegen-path");
  connection = g_object_get_data (object, "gdbus-codegen-connection");
  if (connection == NULL || path == NULL)
    goto out;

  builder = g_variant_builder_new (G_VARIANT_TYPE_TUPLE);
  g_assert_cmpint (n_param_values - 1, ==, 3);
  param_values++;
  item = g_variant_new_int32 (g_value_get_int (param_values));
  g_variant_builder_add_value (builder, item);
  param_values++;
  item = g_variant_new ("^as", g_value_get_boxed (param_values));
  g_variant_builder_add_value (builder, item);
  param_values++;
  item = g_value_dup_variant (param_values);
  g_variant_builder_add_value (builder, item);
  param_values++;
  params = g_variant_builder_end (builder);
  g_variant_builder_unref (builder);

  g_dbus_connection_emit_signal (connection,
                                 NULL,
                                 path,
                                 "org.project.Bar",
                                 "TestSignal",
                                 params,
                                 NULL);
out:
  return TRUE;
}

static gboolean
signal_emission_hook_cb_another_signal (GSignalInvocationHint *ihint,
                         guint                  n_param_values,
                         const GValue          *param_values,
                         gpointer               user_data)
{
  GObject *object;
  GDBusConnection *connection;
  const gchar *path;
  GVariant *params;
  GVariant *item;
  GVariantBuilder *builder;

  if (n_param_values < 1 || !G_VALUE_HOLDS (&param_values[0], G_TYPE_OBJECT))
    goto out;
  object = g_value_get_object (&param_values[0]);
  path = g_object_get_data (object, "gdbus-codegen-path");
  connection = g_object_get_data (object, "gdbus-codegen-connection");
  if (connection == NULL || path == NULL)
    goto out;

  builder = g_variant_builder_new (G_VARIANT_TYPE_TUPLE);
  g_assert_cmpint (n_param_values - 1, ==, 1);
  param_values++;
  item = g_variant_new ("s", g_value_get_string (param_values));
  g_variant_builder_add_value (builder, item);
  param_values++;
  params = g_variant_builder_end (builder);
  g_variant_builder_unref (builder);

  g_dbus_connection_emit_signal (connection,
                                 NULL,
                                 path,
                                 "org.project.Bar",
                                 "AnotherSignal",
                                 params,
                                 NULL);
out:
  return TRUE;
}

static void
foo_bar_default_init (FooBarIface *iface)
{

  /* Build lookup structures */
  _method_name_to_id = g_hash_table_new (g_str_hash, g_str_equal);
  _signal_name_to_id = g_hash_table_new (g_str_hash, g_str_equal);
  _property_name_to_id = g_hash_table_new (g_str_hash, g_str_equal);
  _property_gname_to_name = g_hash_table_new (g_str_hash, g_str_equal);
  _property_name_to_gname = g_hash_table_new (g_str_hash, g_str_equal);
  g_hash_table_insert (_method_name_to_id, "HelloWorld", GUINT_TO_POINTER (__HELLO_WORLD_METHOD));
  g_hash_table_insert (_method_name_to_id, "TestPrimitiveTypes", GUINT_TO_POINTER (__TEST_PRIMITIVE_TYPES_METHOD));
  g_hash_table_insert (_method_name_to_id, "TestNonPrimitiveTypes", GUINT_TO_POINTER (__TEST_NON_PRIMITIVE_TYPES_METHOD));
  g_hash_table_insert (_method_name_to_id, "RequestSignalEmission", GUINT_TO_POINTER (__REQUEST_SIGNAL_EMISSION_METHOD));
  g_hash_table_insert (_method_name_to_id, "RequestMultiPropertyMods", GUINT_TO_POINTER (__REQUEST_MULTI_PROPERTY_MODS_METHOD));
  g_hash_table_insert (_signal_name_to_id, "TestSignal", GUINT_TO_POINTER (__TEST_SIGNAL_SIGNAL));
  g_hash_table_insert (_signal_name_to_id, "AnotherSignal", GUINT_TO_POINTER (__ANOTHER_SIGNAL_SIGNAL));
  g_hash_table_insert (_property_name_to_id, "y", GUINT_TO_POINTER (PROP_Y));
  g_hash_table_insert (_property_name_to_id, "b", GUINT_TO_POINTER (PROP_B));
  g_hash_table_insert (_property_name_to_id, "n", GUINT_TO_POINTER (PROP_N));
  g_hash_table_insert (_property_name_to_id, "q", GUINT_TO_POINTER (PROP_Q));
  g_hash_table_insert (_property_name_to_id, "i", GUINT_TO_POINTER (PROP_I));
  g_hash_table_insert (_property_name_to_id, "u", GUINT_TO_POINTER (PROP_U));
  g_hash_table_insert (_property_name_to_id, "x", GUINT_TO_POINTER (PROP_X));
  g_hash_table_insert (_property_name_to_id, "t", GUINT_TO_POINTER (PROP_T));
  g_hash_table_insert (_property_name_to_id, "d", GUINT_TO_POINTER (PROP_D));
  g_hash_table_insert (_property_name_to_id, "s", GUINT_TO_POINTER (PROP_S));
  g_hash_table_insert (_property_name_to_id, "o", GUINT_TO_POINTER (PROP_O));
  g_hash_table_insert (_property_name_to_id, "g", GUINT_TO_POINTER (PROP_G));
  g_hash_table_insert (_property_name_to_id, "ay", GUINT_TO_POINTER (PROP_AY));
  g_hash_table_insert (_property_name_to_id, "as", GUINT_TO_POINTER (PROP_AS));
  g_hash_table_insert (_property_name_to_id, "ao", GUINT_TO_POINTER (PROP_AO));
  g_hash_table_insert (_property_name_to_id, "ag", GUINT_TO_POINTER (PROP_AG));
  g_hash_table_insert (_property_name_to_id, "FinallyNormalName", GUINT_TO_POINTER (PROP_FINALLY_NORMAL_NAME));
  g_hash_table_insert (_property_name_to_id, "ReadonlyProperty", GUINT_TO_POINTER (PROP_READONLY_PROPERTY));
  g_hash_table_insert (_property_name_to_id, "WriteonlyProperty", GUINT_TO_POINTER (PROP_WRITEONLY_PROPERTY));
  g_hash_table_insert (_property_name_to_id, "unset_i", GUINT_TO_POINTER (PROP_UNSET_I));
  g_hash_table_insert (_property_name_to_id, "unset_d", GUINT_TO_POINTER (PROP_UNSET_D));
  g_hash_table_insert (_property_name_to_id, "unset_s", GUINT_TO_POINTER (PROP_UNSET_S));
  g_hash_table_insert (_property_name_to_id, "unset_o", GUINT_TO_POINTER (PROP_UNSET_O));
  g_hash_table_insert (_property_name_to_id, "unset_g", GUINT_TO_POINTER (PROP_UNSET_G));
  g_hash_table_insert (_property_name_to_id, "unset_ay", GUINT_TO_POINTER (PROP_UNSET_AY));
  g_hash_table_insert (_property_name_to_id, "unset_as", GUINT_TO_POINTER (PROP_UNSET_AS));
  g_hash_table_insert (_property_name_to_id, "unset_ao", GUINT_TO_POINTER (PROP_UNSET_AO));
  g_hash_table_insert (_property_name_to_id, "unset_ag", GUINT_TO_POINTER (PROP_UNSET_AG));
  g_hash_table_insert (_property_name_to_id, "unset_struct", GUINT_TO_POINTER (PROP_UNSET_STRUCT));
  g_hash_table_insert (_property_gname_to_name, "y", "y");
  g_hash_table_insert (_property_gname_to_name, "b", "b");
  g_hash_table_insert (_property_gname_to_name, "n", "n");
  g_hash_table_insert (_property_gname_to_name, "q", "q");
  g_hash_table_insert (_property_gname_to_name, "i", "i");
  g_hash_table_insert (_property_gname_to_name, "u", "u");
  g_hash_table_insert (_property_gname_to_name, "x", "x");
  g_hash_table_insert (_property_gname_to_name, "t", "t");
  g_hash_table_insert (_property_gname_to_name, "d", "d");
  g_hash_table_insert (_property_gname_to_name, "s", "s");
  g_hash_table_insert (_property_gname_to_name, "o", "o");
  g_hash_table_insert (_property_gname_to_name, "g", "g");
  g_hash_table_insert (_property_gname_to_name, "ay", "ay");
  g_hash_table_insert (_property_gname_to_name, "as", "as");
  g_hash_table_insert (_property_gname_to_name, "ao", "ao");
  g_hash_table_insert (_property_gname_to_name, "ag", "ag");
  g_hash_table_insert (_property_gname_to_name, "finally-normal-name", "FinallyNormalName");
  g_hash_table_insert (_property_gname_to_name, "readonly-property", "ReadonlyProperty");
  g_hash_table_insert (_property_gname_to_name, "writeonly-property", "WriteonlyProperty");
  g_hash_table_insert (_property_gname_to_name, "unset-i", "unset_i");
  g_hash_table_insert (_property_gname_to_name, "unset-d", "unset_d");
  g_hash_table_insert (_property_gname_to_name, "unset-s", "unset_s");
  g_hash_table_insert (_property_gname_to_name, "unset-o", "unset_o");
  g_hash_table_insert (_property_gname_to_name, "unset-g", "unset_g");
  g_hash_table_insert (_property_gname_to_name, "unset-ay", "unset_ay");
  g_hash_table_insert (_property_gname_to_name, "unset-as", "unset_as");
  g_hash_table_insert (_property_gname_to_name, "unset-ao", "unset_ao");
  g_hash_table_insert (_property_gname_to_name, "unset-ag", "unset_ag");
  g_hash_table_insert (_property_gname_to_name, "unset-struct", "unset_struct");
  g_hash_table_insert (_property_name_to_gname, "y", "y");
  g_hash_table_insert (_property_name_to_gname, "b", "b");
  g_hash_table_insert (_property_name_to_gname, "n", "n");
  g_hash_table_insert (_property_name_to_gname, "q", "q");
  g_hash_table_insert (_property_name_to_gname, "i", "i");
  g_hash_table_insert (_property_name_to_gname, "u", "u");
  g_hash_table_insert (_property_name_to_gname, "x", "x");
  g_hash_table_insert (_property_name_to_gname, "t", "t");
  g_hash_table_insert (_property_name_to_gname, "d", "d");
  g_hash_table_insert (_property_name_to_gname, "s", "s");
  g_hash_table_insert (_property_name_to_gname, "o", "o");
  g_hash_table_insert (_property_name_to_gname, "g", "g");
  g_hash_table_insert (_property_name_to_gname, "ay", "ay");
  g_hash_table_insert (_property_name_to_gname, "as", "as");
  g_hash_table_insert (_property_name_to_gname, "ao", "ao");
  g_hash_table_insert (_property_name_to_gname, "ag", "ag");
  g_hash_table_insert (_property_name_to_gname, "FinallyNormalName", "finally-normal-name");
  g_hash_table_insert (_property_name_to_gname, "ReadonlyProperty", "readonly-property");
  g_hash_table_insert (_property_name_to_gname, "WriteonlyProperty", "writeonly-property");
  g_hash_table_insert (_property_name_to_gname, "unset_i", "unset-i");
  g_hash_table_insert (_property_name_to_gname, "unset_d", "unset-d");
  g_hash_table_insert (_property_name_to_gname, "unset_s", "unset-s");
  g_hash_table_insert (_property_name_to_gname, "unset_o", "unset-o");
  g_hash_table_insert (_property_name_to_gname, "unset_g", "unset-g");
  g_hash_table_insert (_property_name_to_gname, "unset_ay", "unset-ay");
  g_hash_table_insert (_property_name_to_gname, "unset_as", "unset-as");
  g_hash_table_insert (_property_name_to_gname, "unset_ao", "unset-ao");
  g_hash_table_insert (_property_name_to_gname, "unset_ag", "unset-ag");
  g_hash_table_insert (_property_name_to_gname, "unset_struct", "unset-struct");

  /* GObject signals definitions for D-Bus signals: */
  /**
   * FooBar::test-signal:
   * @object: The object emitting the signal.
   * @val_int32: Parameter.
   * @array_of_strings: Parameter.
   * @dict_s_to_pairs: Parameter.
   *
   * Represents the D-Bus signal <literal>TestSignal</literal>.
   *
   * On proxies, connect to this signal to get notified whenever the remote
   * object instances emits the signal (similar to how the
   * #GDBusProxy::g-signal works). The signal is emitted in the
   * thread-default main loop of the thread that the proxy was created in.
   *
   * On exported objects, emitting this signal causes the actual D-Bus signal to be emitted. You can use foo_bar_emit_test_signal() to do this.
   */  signals[__TEST_SIGNAL_SIGNAL] =
    g_signal_new ("test-signal",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, test_signal),
                  NULL,
                  NULL,
                  _test_gdbus_cclosure_marshaller_VOID__INT_BOXED_VARIANT,
                  G_TYPE_NONE,
                  3,
                  G_TYPE_INT,
                  G_TYPE_STRV,
                  G_TYPE_VARIANT);
  g_signal_add_emission_hook (signals[__TEST_SIGNAL_SIGNAL],
                              0,
                              signal_emission_hook_cb_test_signal,
                              "TestSignal",
                              NULL);

  /**
   * FooBar::another-signal:
   * @object: The object emitting the signal.
   * @word: Parameter.
   *
   * Represents the D-Bus signal <literal>AnotherSignal</literal>.
   *
   * On proxies, connect to this signal to get notified whenever the remote
   * object instances emits the signal (similar to how the
   * #GDBusProxy::g-signal works). The signal is emitted in the
   * thread-default main loop of the thread that the proxy was created in.
   *
   * On exported objects, emitting this signal causes the actual D-Bus signal to be emitted. You can use foo_bar_emit_another_signal() to do this.
   */  signals[__ANOTHER_SIGNAL_SIGNAL] =
    g_signal_new ("another-signal",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, another_signal),
                  NULL,
                  NULL,
                  _test_gdbus_cclosure_marshaller_VOID__STRING,
                  G_TYPE_NONE,
                  1,
                  G_TYPE_STRING);
  g_signal_add_emission_hook (signals[__ANOTHER_SIGNAL_SIGNAL],
                              0,
                              signal_emission_hook_cb_another_signal,
                              "AnotherSignal",
                              NULL);


  /* GObject signals definitions for D-Bus methods: */
  /**
   * FooBar::handle-hello-world:
   * @object: The exported object emitting the signal.
   * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
   * @greeting: Parameter.
   *
   * On exported objects, this signal is emitted when a remote process (identified by @invocation) invokes the <literal>HelloWorld</literal> D-Bus method on @object. Use foo_bar_complete_hello_world() to return a value or g_dbus_method_invocation_return_error() to return an error.
   *
   * The signal is emitted in the thread-default main loop of the thread that foo_bar_register_object() was called from.
   *
   * On proxies, this signal is never emitted.
   *
   * Returns: %TRUE if you want to handle the method call (will stop further handlers from being called), %FALSE otherwise.
   */
  signals[__HELLO_WORLD_METHOD] =
    g_signal_new ("handle-hello-world",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, handle_hello_world),
                  g_signal_accumulator_true_handled,
                  NULL,
                  _test_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_STRING,
                  G_TYPE_BOOLEAN,
                  2,
                  G_TYPE_DBUS_METHOD_INVOCATION,
                  G_TYPE_STRING);
  /**
   * FooBar::handle-test-primitive-types:
   * @object: The exported object emitting the signal.
   * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
   * @val_byte: Parameter.
   * @val_boolean: Parameter.
   * @val_int16: Parameter.
   * @val_uint16: Parameter.
   * @val_int32: Parameter.
   * @val_uint32: Parameter.
   * @val_int64: Parameter.
   * @val_uint64: Parameter.
   * @val_double: Parameter.
   * @val_string: Parameter.
   * @val_objpath: Parameter.
   * @val_signature: Parameter.
   *
   * On exported objects, this signal is emitted when a remote process (identified by @invocation) invokes the <literal>TestPrimitiveTypes</literal> D-Bus method on @object. Use foo_bar_complete_test_primitive_types() to return a value or g_dbus_method_invocation_return_error() to return an error.
   *
   * The signal is emitted in the thread-default main loop of the thread that foo_bar_register_object() was called from.
   *
   * On proxies, this signal is never emitted.
   *
   * Returns: %TRUE if you want to handle the method call (will stop further handlers from being called), %FALSE otherwise.
   */
  signals[__TEST_PRIMITIVE_TYPES_METHOD] =
    g_signal_new ("handle-test-primitive-types",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, handle_test_primitive_types),
                  g_signal_accumulator_true_handled,
                  NULL,
                  _test_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_UCHAR_BOOLEAN_INT_UINT_INT_UINT_INT64_UINT64_DOUBLE_STRING_STRING_STRING,
                  G_TYPE_BOOLEAN,
                  13,
                  G_TYPE_DBUS_METHOD_INVOCATION,
                  G_TYPE_UCHAR,
                  G_TYPE_BOOLEAN,
                  G_TYPE_INT,
                  G_TYPE_UINT,
                  G_TYPE_INT,
                  G_TYPE_UINT,
                  G_TYPE_INT64,
                  G_TYPE_UINT64,
                  G_TYPE_DOUBLE,
                  G_TYPE_STRING,
                  G_TYPE_STRING,
                  G_TYPE_STRING);
  /**
   * FooBar::handle-test-non-primitive-types:
   * @object: The exported object emitting the signal.
   * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
   * @dict_s_to_s: Parameter.
   * @dict_s_to_pairs: Parameter.
   * @a_struct: Parameter.
   * @array_of_strings: Parameter.
   * @array_of_objpaths: Parameter.
   * @array_of_signatures: Parameter.
   *
   * On exported objects, this signal is emitted when a remote process (identified by @invocation) invokes the <literal>TestNonPrimitiveTypes</literal> D-Bus method on @object. Use foo_bar_complete_test_non_primitive_types() to return a value or g_dbus_method_invocation_return_error() to return an error.
   *
   * The signal is emitted in the thread-default main loop of the thread that foo_bar_register_object() was called from.
   *
   * On proxies, this signal is never emitted.
   *
   * Returns: %TRUE if you want to handle the method call (will stop further handlers from being called), %FALSE otherwise.
   */
  signals[__TEST_NON_PRIMITIVE_TYPES_METHOD] =
    g_signal_new ("handle-test-non-primitive-types",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, handle_test_non_primitive_types),
                  g_signal_accumulator_true_handled,
                  NULL,
                  _test_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_VARIANT_VARIANT_VARIANT_BOXED_VARIANT_VARIANT,
                  G_TYPE_BOOLEAN,
                  7,
                  G_TYPE_DBUS_METHOD_INVOCATION,
                  G_TYPE_VARIANT,
                  G_TYPE_VARIANT,
                  G_TYPE_VARIANT,
                  G_TYPE_STRV,
                  G_TYPE_VARIANT,
                  G_TYPE_VARIANT);
  /**
   * FooBar::handle-request-signal-emission:
   * @object: The exported object emitting the signal.
   * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
   * @which_one: Parameter.
   *
   * On exported objects, this signal is emitted when a remote process (identified by @invocation) invokes the <literal>RequestSignalEmission</literal> D-Bus method on @object. Use foo_bar_complete_request_signal_emission() to return a value or g_dbus_method_invocation_return_error() to return an error.
   *
   * The signal is emitted in the thread-default main loop of the thread that foo_bar_register_object() was called from.
   *
   * On proxies, this signal is never emitted.
   *
   * Returns: %TRUE if you want to handle the method call (will stop further handlers from being called), %FALSE otherwise.
   */
  signals[__REQUEST_SIGNAL_EMISSION_METHOD] =
    g_signal_new ("handle-request-signal-emission",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, handle_request_signal_emission),
                  g_signal_accumulator_true_handled,
                  NULL,
                  _test_gdbus_cclosure_marshaller_BOOLEAN__OBJECT_INT,
                  G_TYPE_BOOLEAN,
                  2,
                  G_TYPE_DBUS_METHOD_INVOCATION,
                  G_TYPE_INT);
  /**
   * FooBar::handle-request-multi-property-mods:
   * @object: The exported object emitting the signal.
   * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
   *
   * On exported objects, this signal is emitted when a remote process (identified by @invocation) invokes the <literal>RequestMultiPropertyMods</literal> D-Bus method on @object. Use foo_bar_complete_request_multi_property_mods() to return a value or g_dbus_method_invocation_return_error() to return an error.
   *
   * The signal is emitted in the thread-default main loop of the thread that foo_bar_register_object() was called from.
   *
   * On proxies, this signal is never emitted.
   *
   * Returns: %TRUE if you want to handle the method call (will stop further handlers from being called), %FALSE otherwise.
   */
  signals[__REQUEST_MULTI_PROPERTY_MODS_METHOD] =
    g_signal_new ("handle-request-multi-property-mods",
                  G_TYPE_FROM_INTERFACE (iface),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (FooBarIface, handle_request_multi_property_mods),
                  g_signal_accumulator_true_handled,
                  NULL,
                  _test_gdbus_cclosure_marshaller_BOOLEAN__OBJECT,
                  G_TYPE_BOOLEAN,
                  1,
                  G_TYPE_DBUS_METHOD_INVOCATION);

  /* GObject property definitions for D-Bus properties: */
  /**
   * FooBar:y:
   *
   * Represents the D-Bus property <literal>y</literal> of type <literal>y</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_uchar ("y", "y", "y",
          0, 255, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:b:
   *
   * Represents the D-Bus property <literal>b</literal> of type <literal>b</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_boolean ("b", "b", "b",
          FALSE,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:n:
   *
   * Represents the D-Bus property <literal>n</literal> of type <literal>n</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_int ("n", "n", "n",
          G_MININT16, G_MAXINT16, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:q:
   *
   * Represents the D-Bus property <literal>q</literal> of type <literal>q</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_uint ("q", "q", "q",
          0, G_MAXUINT16, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:i:
   *
   * Represents the D-Bus property <literal>i</literal> of type <literal>i</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_int ("i", "i", "i",
          G_MININT32, G_MAXINT32, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:u:
   *
   * Represents the D-Bus property <literal>u</literal> of type <literal>u</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_uint ("u", "u", "u",
          0, G_MAXUINT32, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:x:
   *
   * Represents the D-Bus property <literal>x</literal> of type <literal>x</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_int64 ("x", "x", "x",
          G_MININT64, G_MAXINT64, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:t:
   *
   * Represents the D-Bus property <literal>t</literal> of type <literal>t</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_uint64 ("t", "t", "t",
          0, G_MAXUINT64, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:d:
   *
   * Represents the D-Bus property <literal>d</literal> of type <literal>d</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_double ("d", "d", "d",
          -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:s:
   *
   * Represents the D-Bus property <literal>s</literal> of type <literal>s</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("s", "s", "s",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:o:
   *
   * Represents the D-Bus property <literal>o</literal> of type <literal>o</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("o", "o", "o",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:g:
   *
   * Represents the D-Bus property <literal>g</literal> of type <literal>g</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("g", "g", "g",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:ay:
   *
   * Represents the D-Bus property <literal>ay</literal> of type <literal>ay</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("ay", "ay", "ay",
          G_VARIANT_TYPE("ay"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:as:
   *
   * Represents the D-Bus property <literal>as</literal> of type <literal>as</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_boxed ("as", "as", "as",
          G_TYPE_STRV,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:ao:
   *
   * Represents the D-Bus property <literal>ao</literal> of type <literal>ao</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("ao", "ao", "ao",
          G_VARIANT_TYPE("ao"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:ag:
   *
   * Represents the D-Bus property <literal>ag</literal> of type <literal>ag</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("ag", "ag", "ag",
          G_VARIANT_TYPE("ag"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:finally-normal-name:
   *
   * Represents the D-Bus property <literal>FinallyNormalName</literal> of type <literal>s</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("finally-normal-name", "FinallyNormalName", "FinallyNormalName",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:readonly-property:
   *
   * Represents the read-only D-Bus property <literal>ReadonlyProperty</literal> of type <literal>s</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   *
   * Since this GObject property represents a non-writable
   * D-Bus property, it is only meaningful to set its value
   * on exported objects, not proxies.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("readonly-property", "ReadonlyProperty", "ReadonlyProperty",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:writeonly-property:
   *
   * Represents the write-only D-Bus property <literal>WriteonlyProperty</literal> of type <literal>s</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   *
   * Since this GObject property represents a non-readable
   * D-Bus property, it is only meaningful to get its value
   * on exported objects, not proxies.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("writeonly-property", "WriteonlyProperty", "WriteonlyProperty",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-i:
   *
   * Represents the D-Bus property <literal>unset_i</literal> of type <literal>i</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_int ("unset-i", "unset_i", "unset_i",
          G_MININT32, G_MAXINT32, 0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-d:
   *
   * Represents the D-Bus property <literal>unset_d</literal> of type <literal>d</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_double ("unset-d", "unset_d", "unset_d",
          -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-s:
   *
   * Represents the D-Bus property <literal>unset_s</literal> of type <literal>s</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("unset-s", "unset_s", "unset_s",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-o:
   *
   * Represents the D-Bus property <literal>unset_o</literal> of type <literal>o</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("unset-o", "unset_o", "unset_o",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-g:
   *
   * Represents the D-Bus property <literal>unset_g</literal> of type <literal>g</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_string ("unset-g", "unset_g", "unset_g",
          NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-ay:
   *
   * Represents the D-Bus property <literal>unset_ay</literal> of type <literal>ay</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("unset-ay", "unset_ay", "unset_ay",
          G_VARIANT_TYPE("ay"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-as:
   *
   * Represents the D-Bus property <literal>unset_as</literal> of type <literal>as</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_boxed ("unset-as", "unset_as", "unset_as",
          G_TYPE_STRV,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-ao:
   *
   * Represents the D-Bus property <literal>unset_ao</literal> of type <literal>ao</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("unset-ao", "unset_ao", "unset_ao",
          G_VARIANT_TYPE("ao"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-ag:
   *
   * Represents the D-Bus property <literal>unset_ag</literal> of type <literal>ag</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("unset-ag", "unset_ag", "unset_ag",
          G_VARIANT_TYPE("ag"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FooBar:unset-struct:
   *
   * Represents the D-Bus property <literal>unset_struct</literal> of type <literal>(idsogayasaoag)</literal>.
   *
   * Writes to this property on proxy objects will cause the
   * <literal>org.freedesktop.DBus.Properties.Set</literal>
   * D-Bus method to be asynchronously invoked on the remote
   * object.
   *
   *
   * Writes to this property on exported objects, will cause the
   * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
   * D-Bus signal to be emitted.
   */
  g_object_interface_install_property (iface,
      g_param_spec_variant ("unset-struct", "unset_struct", "unset_struct",
          G_VARIANT_TYPE("(idsogayasaoag)"), NULL,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

}


/* C Bindings for properties */

/**
 * foo_bar_get_y:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:y property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
guchar 
foo_bar_get_y (FooBar *object)
{
  guchar value;
  g_object_get (G_OBJECT (object), "y", &value, NULL);
  return value;
}

/**
 * foo_bar_set_y:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:y property. This call does no blocking I/O.
 */
void
foo_bar_set_y (FooBar *object, guchar value)
{
  g_object_set (G_OBJECT (object), "y", value, NULL);
}


/**
 * foo_bar_get_b:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:b property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gboolean 
foo_bar_get_b (FooBar *object)
{
  gboolean value;
  g_object_get (G_OBJECT (object), "b", &value, NULL);
  return value;
}

/**
 * foo_bar_set_b:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:b property. This call does no blocking I/O.
 */
void
foo_bar_set_b (FooBar *object, gboolean value)
{
  g_object_set (G_OBJECT (object), "b", value, NULL);
}


/**
 * foo_bar_get_n:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:n property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gint16 
foo_bar_get_n (FooBar *object)
{
  gint value;
  g_object_get (G_OBJECT (object), "n", &value, NULL);
  return value;
}

/**
 * foo_bar_set_n:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:n property. This call does no blocking I/O.
 */
void
foo_bar_set_n (FooBar *object, gint16 value)
{
  g_object_set (G_OBJECT (object), "n", value, NULL);
}


/**
 * foo_bar_get_q:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:q property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
guint16 
foo_bar_get_q (FooBar *object)
{
  guint value;
  g_object_get (G_OBJECT (object), "q", &value, NULL);
  return value;
}

/**
 * foo_bar_set_q:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:q property. This call does no blocking I/O.
 */
void
foo_bar_set_q (FooBar *object, guint16 value)
{
  g_object_set (G_OBJECT (object), "q", value, NULL);
}


/**
 * foo_bar_get_i:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:i property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gint 
foo_bar_get_i (FooBar *object)
{
  gint value;
  g_object_get (G_OBJECT (object), "i", &value, NULL);
  return value;
}

/**
 * foo_bar_set_i:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:i property. This call does no blocking I/O.
 */
void
foo_bar_set_i (FooBar *object, gint value)
{
  g_object_set (G_OBJECT (object), "i", value, NULL);
}


/**
 * foo_bar_get_u:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:u property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
guint 
foo_bar_get_u (FooBar *object)
{
  guint value;
  g_object_get (G_OBJECT (object), "u", &value, NULL);
  return value;
}

/**
 * foo_bar_set_u:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:u property. This call does no blocking I/O.
 */
void
foo_bar_set_u (FooBar *object, guint value)
{
  g_object_set (G_OBJECT (object), "u", value, NULL);
}


/**
 * foo_bar_get_x:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:x property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gint64 
foo_bar_get_x (FooBar *object)
{
  gint64 value;
  g_object_get (G_OBJECT (object), "x", &value, NULL);
  return value;
}

/**
 * foo_bar_set_x:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:x property. This call does no blocking I/O.
 */
void
foo_bar_set_x (FooBar *object, gint64 value)
{
  g_object_set (G_OBJECT (object), "x", value, NULL);
}


/**
 * foo_bar_get_t:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:t property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
guint64 
foo_bar_get_t (FooBar *object)
{
  guint64 value;
  g_object_get (G_OBJECT (object), "t", &value, NULL);
  return value;
}

/**
 * foo_bar_set_t:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:t property. This call does no blocking I/O.
 */
void
foo_bar_set_t (FooBar *object, guint64 value)
{
  g_object_set (G_OBJECT (object), "t", value, NULL);
}


/**
 * foo_bar_get_d:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:d property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gdouble 
foo_bar_get_d (FooBar *object)
{
  gdouble value;
  g_object_get (G_OBJECT (object), "d", &value, NULL);
  return value;
}

/**
 * foo_bar_set_d:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:d property. This call does no blocking I/O.
 */
void
foo_bar_set_d (FooBar *object, gdouble value)
{
  g_object_set (G_OBJECT (object), "d", value, NULL);
}


/**
 * foo_bar_get_s:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:s property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_s (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "s", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-s",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_s:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:s property. This call does no blocking I/O.
 */
void
foo_bar_set_s (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "s", value, NULL);
}


/**
 * foo_bar_get_o:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:o property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_o (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "o", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-o",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_o:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:o property. This call does no blocking I/O.
 */
void
foo_bar_set_o (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "o", value, NULL);
}


/**
 * foo_bar_get_g:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:g property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_g (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "g", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-g",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_g:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:g property. This call does no blocking I/O.
 */
void
foo_bar_set_g (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "g", value, NULL);
}


/**
 * foo_bar_get_ay:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:ay property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_ay (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "ay", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-ay",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_ay:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:ay property. This call does no blocking I/O.
 */
void
foo_bar_set_ay (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "ay", value, NULL);
}


/**
 * foo_bar_get_as:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:as property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar* const *
foo_bar_get_as (FooBar *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "as", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-as",
                          value,
                          (GDestroyNotify) g_strfreev);
  return (const gchar* const *) value;
}

/**
 * foo_bar_set_as:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:as property. This call does no blocking I/O.
 */
void
foo_bar_set_as (FooBar *object, const gchar* const *value)
{
  g_object_set (G_OBJECT (object), "as", value, NULL);
}


/**
 * foo_bar_get_ao:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:ao property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_ao (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "ao", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-ao",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_ao:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:ao property. This call does no blocking I/O.
 */
void
foo_bar_set_ao (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "ao", value, NULL);
}


/**
 * foo_bar_get_ag:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:ag property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_ag (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "ag", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-ag",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_ag:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:ag property. This call does no blocking I/O.
 */
void
foo_bar_set_ag (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "ag", value, NULL);
}


/**
 * foo_bar_get_finally_normal_name:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:finally-normal-name property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_finally_normal_name (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "finally-normal-name", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-finally-normal-name",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_finally_normal_name:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:finally-normal-name property. This call does no blocking I/O.
 */
void
foo_bar_set_finally_normal_name (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "finally-normal-name", value, NULL);
}


/**
 * foo_bar_get_readonly_property:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:readonly-property property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_readonly_property (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "readonly-property", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-readonly-property",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_readonly_property:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:readonly-property property. This call does no blocking I/O.
 *
 * Since this GObject property represents a non-writable
 * D-Bus property, it is only meaningful to use this
 * on exported objects, not proxies.
 */
void
foo_bar_set_readonly_property (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "readonly-property", value, NULL);
}


/**
 * foo_bar_get_writeonly_property:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:writeonly-property property. This call does no blocking I/O.
 *
 * Since this GObject property represents a non-readable
 * D-Bus property, it is only meaningful to use this
 * on exported objects, not proxies.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_writeonly_property (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "writeonly-property", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-writeonly-property",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_writeonly_property:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:writeonly-property property. This call does no blocking I/O.
 */
void
foo_bar_set_writeonly_property (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "writeonly-property", value, NULL);
}


/**
 * foo_bar_get_unset_i:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-i property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gint 
foo_bar_get_unset_i (FooBar *object)
{
  gint value;
  g_object_get (G_OBJECT (object), "unset-i", &value, NULL);
  return value;
}

/**
 * foo_bar_set_unset_i:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-i property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_i (FooBar *object, gint value)
{
  g_object_set (G_OBJECT (object), "unset-i", value, NULL);
}


/**
 * foo_bar_get_unset_d:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-d property. This call does no blocking I/O.
 *
 * Returns: The value of the property.
 */
gdouble 
foo_bar_get_unset_d (FooBar *object)
{
  gdouble value;
  g_object_get (G_OBJECT (object), "unset-d", &value, NULL);
  return value;
}

/**
 * foo_bar_set_unset_d:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-d property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_d (FooBar *object, gdouble value)
{
  g_object_set (G_OBJECT (object), "unset-d", value, NULL);
}


/**
 * foo_bar_get_unset_s:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-s property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_unset_s (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "unset-s", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-s",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_unset_s:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-s property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_s (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "unset-s", value, NULL);
}


/**
 * foo_bar_get_unset_o:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-o property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_unset_o (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "unset-o", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-o",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_unset_o:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-o property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_o (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "unset-o", value, NULL);
}


/**
 * foo_bar_get_unset_g:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-g property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar *
foo_bar_get_unset_g (FooBar *object)
{
  gchar *value;
  g_object_get (G_OBJECT (object), "unset-g", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-g",
                          value,
                          (GDestroyNotify) g_free);
  return (const gchar *) value;
}

/**
 * foo_bar_set_unset_g:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-g property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_g (FooBar *object, const gchar *value)
{
  g_object_set (G_OBJECT (object), "unset-g", value, NULL);
}


/**
 * foo_bar_get_unset_ay:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-ay property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_unset_ay (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "unset-ay", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-ay",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_unset_ay:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-ay property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_ay (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "unset-ay", value, NULL);
}


/**
 * foo_bar_get_unset_as:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-as property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
const gchar* const *
foo_bar_get_unset_as (FooBar *object)
{
  gchar **value;
  g_object_get (G_OBJECT (object), "unset-as", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-as",
                          value,
                          (GDestroyNotify) g_strfreev);
  return (const gchar* const *) value;
}

/**
 * foo_bar_set_unset_as:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-as property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_as (FooBar *object, const gchar* const *value)
{
  g_object_set (G_OBJECT (object), "unset-as", value, NULL);
}


/**
 * foo_bar_get_unset_ao:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-ao property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_unset_ao (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "unset-ao", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-ao",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_unset_ao:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-ao property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_ao (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "unset-ao", value, NULL);
}


/**
 * foo_bar_get_unset_ag:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-ag property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_unset_ag (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "unset-ag", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-ag",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_unset_ag:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-ag property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_ag (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "unset-ag", value, NULL);
}


/**
 * foo_bar_get_unset_struct:
 * @object: A #FooBar that is either a proxy or an exported object.
 *
 * Getter for the #FooBar:unset-struct property. This call does no blocking I/O.
 *
 * The returned value is only valid until the next time this is called or @object is finalized.
 *
 * Returns: The value of the property. Do not free, it is owned by @object.
 */
GVariant *
foo_bar_get_unset_struct (FooBar *object)
{
  GVariant *value;
  g_object_get (G_OBJECT (object), "unset-struct", &value, NULL);
  g_object_set_data_full (G_OBJECT (object),
                          "gdbus-codegen-property-cache-unset-struct",
                          value,
                          (GDestroyNotify) g_variant_unref);
  return (GVariant *) value;
}

/**
 * foo_bar_set_unset_struct:
 * @object: A #FooBar that is either a proxy or an exported object.
 * @value: The value to set.
 *
 * Setter for the #FooBar:unset-struct property. This call does no blocking I/O.
 */
void
foo_bar_set_unset_struct (FooBar *object, GVariant *value)
{
  g_object_set (G_OBJECT (object), "unset-struct", value, NULL);
}


/**
 * foo_bar_call_hello_world:
 * @proxy: A #FooBar.
 * @greeting: Method parameter.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
 * @user_data: Data to pass to @callback.
 *
 * Invokes the <literal>org.project.Bar.HelloWorld</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * This is an asynchronous method. When the operation is finished,
 * callback will be invoked in the thread-default main loop of the
 * thread you are calling this method from. You can then call
 * foo_bar_call_hello_world_finish() to get the result of the operation.
 *
 * See foo_bar_call_hello_world_sync() for the synchronous version of this method.
 */
void foo_bar_call_hello_world (
        FooBar *proxy,
        const gchar *greeting,
        GCancellable *cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data)
{
  GVariant *_params;
  _params = g_variant_new ("(s)",
                           greeting);
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
                     "HelloWorld",
                     _params,
                     G_DBUS_CALL_FLAGS_NONE,
                     -1,
                     cancellable,
                     callback,
                     user_data);
}

/**
 * foo_bar_call_hello_world_finish:
 * @proxy: A #FooBar.
 * @out_response: Return location for out parameter or %NULL. Free with g_free().
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_bar_call_hello_world().
 * @error: Return location for error or %NULL.
 *
 * Finishes invoking the <literal>org.project.Bar.HelloWorld</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_hello_world_finish (
        FooBar *proxy,
        gchar **out_response,
        GAsyncResult *res,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_result;
  _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_result == NULL)
    goto _out;
  {
    g_variant_get (_result,
                   "(s)",
                   out_response);
  }
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}

/**
 * foo_bar_call_hello_world_sync:
 * @proxy: A #FooBar.
 * @greeting: Method parameter.
 * @out_response: Return location for out parameter or %NULL. Free with g_free().
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <literal>org.project.Bar.HelloWorld</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * The calling thread is blocked until a reply is received. See
 * foo_bar_call_hello_world() for the asynchronous version of this method.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_hello_world_sync (
        FooBar *proxy,
        const gchar *greeting,
        gchar **out_response,
        GCancellable *cancellable,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_params;
  GVariant *_result;
  _params = g_variant_new ("(s)",
                           greeting);
  _result = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
                                   "HelloWorld",
                                   _params,
                                   G_DBUS_CALL_FLAGS_NONE,
                                   -1,
                                   cancellable,
                                   error);
  if (_result == NULL)
    goto _out;
  {
    g_variant_get (_result,
                   "(s)",
                   out_response);
  }
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}


/**
 * foo_bar_call_test_primitive_types:
 * @proxy: A #FooBar.
 * @val_byte: Method parameter.
 * @val_boolean: Method parameter.
 * @val_int16: Method parameter.
 * @val_uint16: Method parameter.
 * @val_int32: Method parameter.
 * @val_uint32: Method parameter.
 * @val_int64: Method parameter.
 * @val_uint64: Method parameter.
 * @val_double: Method parameter.
 * @val_string: Method parameter.
 * @val_objpath: Method parameter.
 * @val_signature: Method parameter.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
 * @user_data: Data to pass to @callback.
 *
 * Invokes the <literal>org.project.Bar.TestPrimitiveTypes</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * This is an asynchronous method. When the operation is finished,
 * callback will be invoked in the thread-default main loop of the
 * thread you are calling this method from. You can then call
 * foo_bar_call_test_primitive_types_finish() to get the result of the operation.
 *
 * See foo_bar_call_test_primitive_types_sync() for the synchronous version of this method.
 */
void foo_bar_call_test_primitive_types (
        FooBar *proxy,
        guchar val_byte,
        gboolean val_boolean,
        gint16 val_int16,
        guint16 val_uint16,
        gint val_int32,
        guint val_uint32,
        gint64 val_int64,
        guint64 val_uint64,
        gdouble val_double,
        const gchar *val_string,
        const gchar *val_objpath,
        const gchar *val_signature,
        GCancellable *cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data)
{
  GVariant *_params;
  _params = g_variant_new ("(ybnqiuxtdsog)",
                           val_byte,
                           val_boolean,
                           val_int16,
                           val_uint16,
                           val_int32,
                           val_uint32,
                           val_int64,
                           val_uint64,
                           val_double,
                           val_string,
                           val_objpath,
                           val_signature);
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
                     "TestPrimitiveTypes",
                     _params,
                     G_DBUS_CALL_FLAGS_NONE,
                     -1,
                     cancellable,
                     callback,
                     user_data);
}

/**
 * foo_bar_call_test_primitive_types_finish:
 * @proxy: A #FooBar.
 * @out_arg_12: Return location for out parameter or %NULL.
 * @out_arg_13: Return location for out parameter or %NULL.
 * @out_arg_14: Return location for out parameter or %NULL.
 * @out_arg_15: Return location for out parameter or %NULL.
 * @out_arg_16: Return location for out parameter or %NULL.
 * @out_arg_17: Return location for out parameter or %NULL.
 * @out_arg_18: Return location for out parameter or %NULL.
 * @out_arg_19: Return location for out parameter or %NULL.
 * @out_arg_20: Return location for out parameter or %NULL.
 * @out_arg_21: Return location for out parameter or %NULL. Free with g_free().
 * @out_arg_22: Return location for out parameter or %NULL. Free with g_free().
 * @out_arg_23: Return location for out parameter or %NULL. Free with g_free().
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_bar_call_test_primitive_types().
 * @error: Return location for error or %NULL.
 *
 * Finishes invoking the <literal>org.project.Bar.TestPrimitiveTypes</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_test_primitive_types_finish (
        FooBar *proxy,
        guchar *out_arg_12,
        gboolean *out_arg_13,
        gint16 *out_arg_14,
        guint16 *out_arg_15,
        gint *out_arg_16,
        guint *out_arg_17,
        gint64 *out_arg_18,
        guint64 *out_arg_19,
        gdouble *out_arg_20,
        gchar **out_arg_21,
        gchar **out_arg_22,
        gchar **out_arg_23,
        GAsyncResult *res,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_result;
  _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_result == NULL)
    goto _out;
  {
    g_variant_get (_result,
                   "(ybnqiuxtdsog)",
                   out_arg_12,
                   out_arg_13,
                   out_arg_14,
                   out_arg_15,
                   out_arg_16,
                   out_arg_17,
                   out_arg_18,
                   out_arg_19,
                   out_arg_20,
                   out_arg_21,
                   out_arg_22,
                   out_arg_23);
  }
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}

/**
 * foo_bar_call_test_primitive_types_sync:
 * @proxy: A #FooBar.
 * @val_byte: Method parameter.
 * @val_boolean: Method parameter.
 * @val_int16: Method parameter.
 * @val_uint16: Method parameter.
 * @val_int32: Method parameter.
 * @val_uint32: Method parameter.
 * @val_int64: Method parameter.
 * @val_uint64: Method parameter.
 * @val_double: Method parameter.
 * @val_string: Method parameter.
 * @val_objpath: Method parameter.
 * @val_signature: Method parameter.
 * @out_arg_12: Return location for out parameter or %NULL.
 * @out_arg_13: Return location for out parameter or %NULL.
 * @out_arg_14: Return location for out parameter or %NULL.
 * @out_arg_15: Return location for out parameter or %NULL.
 * @out_arg_16: Return location for out parameter or %NULL.
 * @out_arg_17: Return location for out parameter or %NULL.
 * @out_arg_18: Return location for out parameter or %NULL.
 * @out_arg_19: Return location for out parameter or %NULL.
 * @out_arg_20: Return location for out parameter or %NULL.
 * @out_arg_21: Return location for out parameter or %NULL. Free with g_free().
 * @out_arg_22: Return location for out parameter or %NULL. Free with g_free().
 * @out_arg_23: Return location for out parameter or %NULL. Free with g_free().
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <literal>org.project.Bar.TestPrimitiveTypes</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * The calling thread is blocked until a reply is received. See
 * foo_bar_call_test_primitive_types() for the asynchronous version of this method.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_test_primitive_types_sync (
        FooBar *proxy,
        guchar val_byte,
        gboolean val_boolean,
        gint16 val_int16,
        guint16 val_uint16,
        gint val_int32,
        guint val_uint32,
        gint64 val_int64,
        guint64 val_uint64,
        gdouble val_double,
        const gchar *val_string,
        const gchar *val_objpath,
        const gchar *val_signature,
        guchar *out_arg_12,
        gboolean *out_arg_13,
        gint16 *out_arg_14,
        guint16 *out_arg_15,
        gint *out_arg_16,
        guint *out_arg_17,
        gint64 *out_arg_18,
        guint64 *out_arg_19,
        gdouble *out_arg_20,
        gchar **out_arg_21,
        gchar **out_arg_22,
        gchar **out_arg_23,
        GCancellable *cancellable,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_params;
  GVariant *_result;
  _params = g_variant_new ("(ybnqiuxtdsog)",
                           val_byte,
                           val_boolean,
                           val_int16,
                           val_uint16,
                           val_int32,
                           val_uint32,
                           val_int64,
                           val_uint64,
                           val_double,
                           val_string,
                           val_objpath,
                           val_signature);
  _result = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
                                   "TestPrimitiveTypes",
                                   _params,
                                   G_DBUS_CALL_FLAGS_NONE,
                                   -1,
                                   cancellable,
                                   error);
  if (_result == NULL)
    goto _out;
  {
    g_variant_get (_result,
                   "(ybnqiuxtdsog)",
                   out_arg_12,
                   out_arg_13,
                   out_arg_14,
                   out_arg_15,
                   out_arg_16,
                   out_arg_17,
                   out_arg_18,
                   out_arg_19,
                   out_arg_20,
                   out_arg_21,
                   out_arg_22,
                   out_arg_23);
  }
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}


/**
 * foo_bar_call_test_non_primitive_types:
 * @proxy: A #FooBar.
 * @dict_s_to_s: Method parameter.
 * @dict_s_to_pairs: Method parameter.
 * @a_struct: Method parameter.
 * @array_of_strings: Method parameter.
 * @array_of_objpaths: Method parameter.
 * @array_of_signatures: Method parameter.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
 * @user_data: Data to pass to @callback.
 *
 * Invokes the <literal>org.project.Bar.TestNonPrimitiveTypes</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * This is an asynchronous method. When the operation is finished,
 * callback will be invoked in the thread-default main loop of the
 * thread you are calling this method from. You can then call
 * foo_bar_call_test_non_primitive_types_finish() to get the result of the operation.
 *
 * See foo_bar_call_test_non_primitive_types_sync() for the synchronous version of this method.
 */
void foo_bar_call_test_non_primitive_types (
        FooBar *proxy,
        GVariant *dict_s_to_s,
        GVariant *dict_s_to_pairs,
        GVariant *a_struct,
        const gchar* const *array_of_strings,
        GVariant *array_of_objpaths,
        GVariant *array_of_signatures,
        GCancellable *cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data)
{
  GVariant *_params;
  _params = g_variant_new ("(***^as**)",
                           dict_s_to_s,
                           dict_s_to_pairs,
                           a_struct,
                           array_of_strings,
                           array_of_objpaths,
                           array_of_signatures);
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
                     "TestNonPrimitiveTypes",
                     _params,
                     G_DBUS_CALL_FLAGS_NONE,
                     -1,
                     cancellable,
                     callback,
                     user_data);
}

/**
 * foo_bar_call_test_non_primitive_types_finish:
 * @proxy: A #FooBar.
 * @out_result: Return location for out parameter or %NULL. Free with g_free().
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_bar_call_test_non_primitive_types().
 * @error: Return location for error or %NULL.
 *
 * Finishes invoking the <literal>org.project.Bar.TestNonPrimitiveTypes</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_test_non_primitive_types_finish (
        FooBar *proxy,
        gchar **out_result,
        GAsyncResult *res,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_result;
  _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_result == NULL)
    goto _out;
  {
    g_variant_get (_result,
                   "(s)",
                   out_result);
  }
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}

/**
 * foo_bar_call_test_non_primitive_types_sync:
 * @proxy: A #FooBar.
 * @dict_s_to_s: Method parameter.
 * @dict_s_to_pairs: Method parameter.
 * @a_struct: Method parameter.
 * @array_of_strings: Method parameter.
 * @array_of_objpaths: Method parameter.
 * @array_of_signatures: Method parameter.
 * @out_result: Return location for out parameter or %NULL. Free with g_free().
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <literal>org.project.Bar.TestNonPrimitiveTypes</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * The calling thread is blocked until a reply is received. See
 * foo_bar_call_test_non_primitive_types() for the asynchronous version of this method.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_test_non_primitive_types_sync (
        FooBar *proxy,
        GVariant *dict_s_to_s,
        GVariant *dict_s_to_pairs,
        GVariant *a_struct,
        const gchar* const *array_of_strings,
        GVariant *array_of_objpaths,
        GVariant *array_of_signatures,
        gchar **out_result,
        GCancellable *cancellable,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_params;
  GVariant *_result;
  _params = g_variant_new ("(***^as**)",
                           dict_s_to_s,
                           dict_s_to_pairs,
                           a_struct,
                           array_of_strings,
                           array_of_objpaths,
                           array_of_signatures);
  _result = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
                                   "TestNonPrimitiveTypes",
                                   _params,
                                   G_DBUS_CALL_FLAGS_NONE,
                                   -1,
                                   cancellable,
                                   error);
  if (_result == NULL)
    goto _out;
  {
    g_variant_get (_result,
                   "(s)",
                   out_result);
  }
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}


/**
 * foo_bar_call_request_signal_emission:
 * @proxy: A #FooBar.
 * @which_one: Method parameter.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
 * @user_data: Data to pass to @callback.
 *
 * Invokes the <literal>org.project.Bar.RequestSignalEmission</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * This is an asynchronous method. When the operation is finished,
 * callback will be invoked in the thread-default main loop of the
 * thread you are calling this method from. You can then call
 * foo_bar_call_request_signal_emission_finish() to get the result of the operation.
 *
 * See foo_bar_call_request_signal_emission_sync() for the synchronous version of this method.
 */
void foo_bar_call_request_signal_emission (
        FooBar *proxy,
        gint which_one,
        GCancellable *cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data)
{
  GVariant *_params;
  _params = g_variant_new ("(i)",
                           which_one);
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
                     "RequestSignalEmission",
                     _params,
                     G_DBUS_CALL_FLAGS_NONE,
                     -1,
                     cancellable,
                     callback,
                     user_data);
}

/**
 * foo_bar_call_request_signal_emission_finish:
 * @proxy: A #FooBar.
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_bar_call_request_signal_emission().
 * @error: Return location for error or %NULL.
 *
 * Finishes invoking the <literal>org.project.Bar.RequestSignalEmission</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_request_signal_emission_finish (
        FooBar *proxy,
        GAsyncResult *res,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_result;
  _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_result == NULL)
    goto _out;
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}

/**
 * foo_bar_call_request_signal_emission_sync:
 * @proxy: A #FooBar.
 * @which_one: Method parameter.
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <literal>org.project.Bar.RequestSignalEmission</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * The calling thread is blocked until a reply is received. See
 * foo_bar_call_request_signal_emission() for the asynchronous version of this method.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_request_signal_emission_sync (
        FooBar *proxy,
        gint which_one,
        GCancellable *cancellable,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_params;
  GVariant *_result;
  _params = g_variant_new ("(i)",
                           which_one);
  _result = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
                                   "RequestSignalEmission",
                                   _params,
                                   G_DBUS_CALL_FLAGS_NONE,
                                   -1,
                                   cancellable,
                                   error);
  if (_result == NULL)
    goto _out;
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}


/**
 * foo_bar_call_request_multi_property_mods:
 * @proxy: A #FooBar.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
 * @user_data: Data to pass to @callback.
 *
 * Invokes the <literal>org.project.Bar.RequestMultiPropertyMods</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * This is an asynchronous method. When the operation is finished,
 * callback will be invoked in the thread-default main loop of the
 * thread you are calling this method from. You can then call
 * foo_bar_call_request_multi_property_mods_finish() to get the result of the operation.
 *
 * See foo_bar_call_request_multi_property_mods_sync() for the synchronous version of this method.
 */
void foo_bar_call_request_multi_property_mods (
        FooBar *proxy,
        GCancellable *cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data)
{
  GVariant *_params;
  _params = NULL;
  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
                     "RequestMultiPropertyMods",
                     _params,
                     G_DBUS_CALL_FLAGS_NONE,
                     -1,
                     cancellable,
                     callback,
                     user_data);
}

/**
 * foo_bar_call_request_multi_property_mods_finish:
 * @proxy: A #FooBar.
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_bar_call_request_multi_property_mods().
 * @error: Return location for error or %NULL.
 *
 * Finishes invoking the <literal>org.project.Bar.RequestMultiPropertyMods</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_request_multi_property_mods_finish (
        FooBar *proxy,
        GAsyncResult *res,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_result;
  _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  if (_result == NULL)
    goto _out;
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}

/**
 * foo_bar_call_request_multi_property_mods_sync:
 * @proxy: A #FooBar.
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Synchronously invokes the <literal>org.project.Bar.RequestMultiPropertyMods</literal>
 * D-Bus method on the remote object represented by @proxy.
 *
 * The calling thread is blocked until a reply is received. See
 * foo_bar_call_request_multi_property_mods() for the asynchronous version of this method.
 *
 * Returns: %TRUE if the call succeeded, %FALSE if @error is set.
 */
gboolean foo_bar_call_request_multi_property_mods_sync (
        FooBar *proxy,
        GCancellable *cancellable,
        GError **error)
{
  gboolean _ret = FALSE;
  GVariant *_params;
  GVariant *_result;
  _params = NULL;
  _result = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
                                   "RequestMultiPropertyMods",
                                   _params,
                                   G_DBUS_CALL_FLAGS_NONE,
                                   -1,
                                   cancellable,
                                   error);
  if (_result == NULL)
    goto _out;
  g_variant_unref (_result);
  _ret = TRUE;
_out:
  return _ret;
}


/**
 * foo_bar_complete_hello_world:
 * @object: A #FooBar.
 * @invocation: A #GDBusMethodInvocation.
 * @response: Value to return.
 *
 * Completes handling the <literal>org.project.Bar.HelloWorld</literal>
 * D-Bus method invocation by returning a value.
 *
 * If you want to return an error, use g_dbus_method_invocation_return_error()
 * or similar instead.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void foo_bar_complete_hello_world (
        FooBar *object,
        GDBusMethodInvocation *invocation,
        const gchar *response)
{
  GVariant *_params;
  _params = g_variant_new ("(s)",
                           response);
  g_dbus_method_invocation_return_value (invocation, _params);
}


/**
 * foo_bar_complete_test_primitive_types:
 * @object: A #FooBar.
 * @invocation: A #GDBusMethodInvocation.
 * @arg_12: Value to return.
 * @arg_13: Value to return.
 * @arg_14: Value to return.
 * @arg_15: Value to return.
 * @arg_16: Value to return.
 * @arg_17: Value to return.
 * @arg_18: Value to return.
 * @arg_19: Value to return.
 * @arg_20: Value to return.
 * @arg_21: Value to return.
 * @arg_22: Value to return.
 * @arg_23: Value to return.
 *
 * Completes handling the <literal>org.project.Bar.TestPrimitiveTypes</literal>
 * D-Bus method invocation by returning a value.
 *
 * If you want to return an error, use g_dbus_method_invocation_return_error()
 * or similar instead.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void foo_bar_complete_test_primitive_types (
        FooBar *object,
        GDBusMethodInvocation *invocation,
        guchar arg_12,
        gboolean arg_13,
        gint16 arg_14,
        guint16 arg_15,
        gint arg_16,
        guint arg_17,
        gint64 arg_18,
        guint64 arg_19,
        gdouble arg_20,
        const gchar *arg_21,
        const gchar *arg_22,
        const gchar *arg_23)
{
  GVariant *_params;
  _params = g_variant_new ("(ybnqiuxtdsog)",
                           arg_12,
                           arg_13,
                           arg_14,
                           arg_15,
                           arg_16,
                           arg_17,
                           arg_18,
                           arg_19,
                           arg_20,
                           arg_21,
                           arg_22,
                           arg_23);
  g_dbus_method_invocation_return_value (invocation, _params);
}


/**
 * foo_bar_complete_test_non_primitive_types:
 * @object: A #FooBar.
 * @invocation: A #GDBusMethodInvocation.
 * @result: Value to return.
 *
 * Completes handling the <literal>org.project.Bar.TestNonPrimitiveTypes</literal>
 * D-Bus method invocation by returning a value.
 *
 * If you want to return an error, use g_dbus_method_invocation_return_error()
 * or similar instead.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void foo_bar_complete_test_non_primitive_types (
        FooBar *object,
        GDBusMethodInvocation *invocation,
        const gchar *result)
{
  GVariant *_params;
  _params = g_variant_new ("(s)",
                           result);
  g_dbus_method_invocation_return_value (invocation, _params);
}


/**
 * foo_bar_complete_request_signal_emission:
 * @object: A #FooBar.
 * @invocation: A #GDBusMethodInvocation.
 *
 * Completes handling the <literal>org.project.Bar.RequestSignalEmission</literal>
 * D-Bus method invocation by returning a value.
 *
 * If you want to return an error, use g_dbus_method_invocation_return_error()
 * or similar instead.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void foo_bar_complete_request_signal_emission (
        FooBar *object,
        GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation, NULL);
}


/**
 * foo_bar_complete_request_multi_property_mods:
 * @object: A #FooBar.
 * @invocation: A #GDBusMethodInvocation.
 *
 * Completes handling the <literal>org.project.Bar.RequestMultiPropertyMods</literal>
 * D-Bus method invocation by returning a value.
 *
 * If you want to return an error, use g_dbus_method_invocation_return_error()
 * or similar instead.
 *
 * This method will free @invocation, you cannot use it afterwards.
 */
void foo_bar_complete_request_multi_property_mods (
        FooBar *object,
        GDBusMethodInvocation *invocation)
{
  g_dbus_method_invocation_return_value (invocation, NULL);
}


/**
 * foo_bar_emit_test_signal:
 * @object: A #FooBar.
 * @val_int32: Signal parameter.
 * @array_of_strings: Signal parameter.
 * @dict_s_to_pairs: Signal parameter.
 *
 * Emits the <literal>org.project.Bar.TestSignal</literal>
 * D-Bus signal.
 */
void foo_bar_emit_test_signal (
        FooBar *object,
        gint val_int32,
        const gchar* const *array_of_strings,
        GVariant *dict_s_to_pairs)
{
  g_signal_emit (object, signals[__TEST_SIGNAL_SIGNAL], 0, val_int32, array_of_strings, dict_s_to_pairs);
}


/**
 * foo_bar_emit_another_signal:
 * @object: A #FooBar.
 * @word: Signal parameter.
 *
 * Emits the <literal>org.project.Bar.AnotherSignal</literal>
 * D-Bus signal.
 */
void foo_bar_emit_another_signal (
        FooBar *object,
        const gchar *word)
{
  g_signal_emit (object, signals[__ANOTHER_SIGNAL_SIGNAL], 0, word);
}


static const GDBusPropertyInfo foo_bar_property_y =
{
  -1,
  "y",
  "y",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_b =
{
  -1,
  "b",
  "b",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_n =
{
  -1,
  "n",
  "n",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_q =
{
  -1,
  "q",
  "q",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_i =
{
  -1,
  "i",
  "i",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_u =
{
  -1,
  "u",
  "u",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_x =
{
  -1,
  "x",
  "x",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_t =
{
  -1,
  "t",
  "t",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_d =
{
  -1,
  "d",
  "d",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_s =
{
  -1,
  "s",
  "s",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_o =
{
  -1,
  "o",
  "o",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_g =
{
  -1,
  "g",
  "g",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_ay =
{
  -1,
  "ay",
  "ay",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_as =
{
  -1,
  "as",
  "as",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_ao =
{
  -1,
  "ao",
  "ao",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_ag =
{
  -1,
  "ag",
  "ag",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_FinallyNormalName =
{
  -1,
  "FinallyNormalName",
  "s",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_ReadonlyProperty =
{
  -1,
  "ReadonlyProperty",
  "s",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_WriteonlyProperty =
{
  -1,
  "WriteonlyProperty",
  "s",
  G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_i =
{
  -1,
  "unset_i",
  "i",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_d =
{
  -1,
  "unset_d",
  "d",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_s =
{
  -1,
  "unset_s",
  "s",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_o =
{
  -1,
  "unset_o",
  "o",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_g =
{
  -1,
  "unset_g",
  "g",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_ay =
{
  -1,
  "unset_ay",
  "ay",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_as =
{
  -1,
  "unset_as",
  "as",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_ao =
{
  -1,
  "unset_ao",
  "ao",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_ag =
{
  -1,
  "unset_ag",
  "ag",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo foo_bar_property_unset_struct =
{
  -1,
  "unset_struct",
  "(idsogayasaoag)",
  G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusPropertyInfo * const foo_bar_property_info_pointers[] =
{
  &foo_bar_property_y,
  &foo_bar_property_b,
  &foo_bar_property_n,
  &foo_bar_property_q,
  &foo_bar_property_i,
  &foo_bar_property_u,
  &foo_bar_property_x,
  &foo_bar_property_t,
  &foo_bar_property_d,
  &foo_bar_property_s,
  &foo_bar_property_o,
  &foo_bar_property_g,
  &foo_bar_property_ay,
  &foo_bar_property_as,
  &foo_bar_property_ao,
  &foo_bar_property_ag,
  &foo_bar_property_FinallyNormalName,
  &foo_bar_property_ReadonlyProperty,
  &foo_bar_property_WriteonlyProperty,
  &foo_bar_property_unset_i,
  &foo_bar_property_unset_d,
  &foo_bar_property_unset_s,
  &foo_bar_property_unset_o,
  &foo_bar_property_unset_g,
  &foo_bar_property_unset_ay,
  &foo_bar_property_unset_as,
  &foo_bar_property_unset_ao,
  &foo_bar_property_unset_ag,
  &foo_bar_property_unset_struct,
  NULL
};

static const GDBusArgInfo foo_bar_signal_TestSignal_val_int32 =
{
  -1,
  "val_int32",
  "i",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_signal_TestSignal_array_of_strings =
{
  -1,
  "array_of_strings",
  "as",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_signal_TestSignal_dict_s_to_pairs =
{
  -1,
  "dict_s_to_pairs",
  "a{s(ii)}",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_signal_TestSignal_arg_pointers[] =
{
  &foo_bar_signal_TestSignal_val_int32,
  &foo_bar_signal_TestSignal_array_of_strings,
  &foo_bar_signal_TestSignal_dict_s_to_pairs,
  NULL
};

static const GDBusSignalInfo foo_bar_signal_TestSignal =
{
  -1,
  "TestSignal",
  (GDBusArgInfo **) &foo_bar_signal_TestSignal_arg_pointers,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusArgInfo foo_bar_signal_AnotherSignal_word =
{
  -1,
  "word",
  "s",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_signal_AnotherSignal_arg_pointers[] =
{
  &foo_bar_signal_AnotherSignal_word,
  NULL
};

static const GDBusSignalInfo foo_bar_signal_AnotherSignal =
{
  -1,
  "AnotherSignal",
  (GDBusArgInfo **) &foo_bar_signal_AnotherSignal_arg_pointers,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusSignalInfo * const foo_bar_signal_info_pointers[] =
{
  &foo_bar_signal_TestSignal,
  &foo_bar_signal_AnotherSignal,
  NULL
};

static const GDBusArgInfo foo_bar_method_in_HelloWorld_greeting =
{
  -1,
  "greeting",
  "s",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_in_HelloWorld_arg_pointers[] =
{
  &foo_bar_method_in_HelloWorld_greeting,
  NULL
};

static const GDBusArgInfo foo_bar_method_out_HelloWorld_response =
{
  -1,
  "response",
  "s",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_out_HelloWorld_arg_pointers[] =
{
  &foo_bar_method_out_HelloWorld_response,
  NULL
};

static const GDBusMethodInfo foo_bar_method_HelloWorld =
{
  -1,
  "HelloWorld",
  (GDBusArgInfo **) &foo_bar_method_in_HelloWorld_arg_pointers,
  (GDBusArgInfo **) &foo_bar_method_out_HelloWorld_arg_pointers,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_byte =
{
  -1,
  "val_byte",
  "y",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_boolean =
{
  -1,
  "val_boolean",
  "b",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_int16 =
{
  -1,
  "val_int16",
  "n",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_uint16 =
{
  -1,
  "val_uint16",
  "q",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_int32 =
{
  -1,
  "val_int32",
  "i",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_uint32 =
{
  -1,
  "val_uint32",
  "u",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_int64 =
{
  -1,
  "val_int64",
  "x",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_uint64 =
{
  -1,
  "val_uint64",
  "t",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_double =
{
  -1,
  "val_double",
  "d",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_string =
{
  -1,
  "val_string",
  "s",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_objpath =
{
  -1,
  "val_objpath",
  "o",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestPrimitiveTypes_val_signature =
{
  -1,
  "val_signature",
  "g",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_in_TestPrimitiveTypes_arg_pointers[] =
{
  &foo_bar_method_in_TestPrimitiveTypes_val_byte,
  &foo_bar_method_in_TestPrimitiveTypes_val_boolean,
  &foo_bar_method_in_TestPrimitiveTypes_val_int16,
  &foo_bar_method_in_TestPrimitiveTypes_val_uint16,
  &foo_bar_method_in_TestPrimitiveTypes_val_int32,
  &foo_bar_method_in_TestPrimitiveTypes_val_uint32,
  &foo_bar_method_in_TestPrimitiveTypes_val_int64,
  &foo_bar_method_in_TestPrimitiveTypes_val_uint64,
  &foo_bar_method_in_TestPrimitiveTypes_val_double,
  &foo_bar_method_in_TestPrimitiveTypes_val_string,
  &foo_bar_method_in_TestPrimitiveTypes_val_objpath,
  &foo_bar_method_in_TestPrimitiveTypes_val_signature,
  NULL
};

static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_12 =
{
  -1,
  "arg_12",
  "y",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_13 =
{
  -1,
  "arg_13",
  "b",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_14 =
{
  -1,
  "arg_14",
  "n",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_15 =
{
  -1,
  "arg_15",
  "q",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_16 =
{
  -1,
  "arg_16",
  "i",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_17 =
{
  -1,
  "arg_17",
  "u",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_18 =
{
  -1,
  "arg_18",
  "x",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_19 =
{
  -1,
  "arg_19",
  "t",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_20 =
{
  -1,
  "arg_20",
  "d",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_21 =
{
  -1,
  "arg_21",
  "s",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_22 =
{
  -1,
  "arg_22",
  "o",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_out_TestPrimitiveTypes_arg_23 =
{
  -1,
  "arg_23",
  "g",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_out_TestPrimitiveTypes_arg_pointers[] =
{
  &foo_bar_method_out_TestPrimitiveTypes_arg_12,
  &foo_bar_method_out_TestPrimitiveTypes_arg_13,
  &foo_bar_method_out_TestPrimitiveTypes_arg_14,
  &foo_bar_method_out_TestPrimitiveTypes_arg_15,
  &foo_bar_method_out_TestPrimitiveTypes_arg_16,
  &foo_bar_method_out_TestPrimitiveTypes_arg_17,
  &foo_bar_method_out_TestPrimitiveTypes_arg_18,
  &foo_bar_method_out_TestPrimitiveTypes_arg_19,
  &foo_bar_method_out_TestPrimitiveTypes_arg_20,
  &foo_bar_method_out_TestPrimitiveTypes_arg_21,
  &foo_bar_method_out_TestPrimitiveTypes_arg_22,
  &foo_bar_method_out_TestPrimitiveTypes_arg_23,
  NULL
};

static const GDBusMethodInfo foo_bar_method_TestPrimitiveTypes =
{
  -1,
  "TestPrimitiveTypes",
  (GDBusArgInfo **) &foo_bar_method_in_TestPrimitiveTypes_arg_pointers,
  (GDBusArgInfo **) &foo_bar_method_out_TestPrimitiveTypes_arg_pointers,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusArgInfo foo_bar_method_in_TestNonPrimitiveTypes_dict_s_to_s =
{
  -1,
  "dict_s_to_s",
  "a{ss}",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestNonPrimitiveTypes_dict_s_to_pairs =
{
  -1,
  "dict_s_to_pairs",
  "a{s(ii)}",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestNonPrimitiveTypes_a_struct =
{
  -1,
  "a_struct",
  "(iss)",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestNonPrimitiveTypes_array_of_strings =
{
  -1,
  "array_of_strings",
  "as",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestNonPrimitiveTypes_array_of_objpaths =
{
  -1,
  "array_of_objpaths",
  "ao",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo foo_bar_method_in_TestNonPrimitiveTypes_array_of_signatures =
{
  -1,
  "array_of_signatures",
  "ag",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_in_TestNonPrimitiveTypes_arg_pointers[] =
{
  &foo_bar_method_in_TestNonPrimitiveTypes_dict_s_to_s,
  &foo_bar_method_in_TestNonPrimitiveTypes_dict_s_to_pairs,
  &foo_bar_method_in_TestNonPrimitiveTypes_a_struct,
  &foo_bar_method_in_TestNonPrimitiveTypes_array_of_strings,
  &foo_bar_method_in_TestNonPrimitiveTypes_array_of_objpaths,
  &foo_bar_method_in_TestNonPrimitiveTypes_array_of_signatures,
  NULL
};

static const GDBusArgInfo foo_bar_method_out_TestNonPrimitiveTypes_result =
{
  -1,
  "result",
  "s",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_out_TestNonPrimitiveTypes_arg_pointers[] =
{
  &foo_bar_method_out_TestNonPrimitiveTypes_result,
  NULL
};

static const GDBusMethodInfo foo_bar_method_TestNonPrimitiveTypes =
{
  -1,
  "TestNonPrimitiveTypes",
  (GDBusArgInfo **) &foo_bar_method_in_TestNonPrimitiveTypes_arg_pointers,
  (GDBusArgInfo **) &foo_bar_method_out_TestNonPrimitiveTypes_arg_pointers,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusArgInfo foo_bar_method_in_RequestSignalEmission_which_one =
{
  -1,
  "which_one",
  "i",
  (GDBusAnnotationInfo **) NULL,
};
static const GDBusArgInfo * const foo_bar_method_in_RequestSignalEmission_arg_pointers[] =
{
  &foo_bar_method_in_RequestSignalEmission_which_one,
  NULL
};

static const GDBusMethodInfo foo_bar_method_RequestSignalEmission =
{
  -1,
  "RequestSignalEmission",
  (GDBusArgInfo **) &foo_bar_method_in_RequestSignalEmission_arg_pointers,
  (GDBusArgInfo **) NULL,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusMethodInfo foo_bar_method_RequestMultiPropertyMods =
{
  -1,
  "RequestMultiPropertyMods",
  (GDBusArgInfo **) NULL,
  (GDBusArgInfo **) NULL,
  (GDBusAnnotationInfo **) NULL,
};

static const GDBusMethodInfo * const foo_bar_method_info_pointers[] =
{
  &foo_bar_method_HelloWorld,
  &foo_bar_method_TestPrimitiveTypes,
  &foo_bar_method_TestNonPrimitiveTypes,
  &foo_bar_method_RequestSignalEmission,
  &foo_bar_method_RequestMultiPropertyMods,
  NULL
};

static const GDBusInterfaceInfo _foo_bar_interface_info =
{
  -1,
  "org.project.Bar",
  (GDBusMethodInfo **) &foo_bar_method_info_pointers,
  (GDBusSignalInfo **) &foo_bar_signal_info_pointers,
  (GDBusPropertyInfo **) &foo_bar_property_info_pointers,
};

static void
handle_method_call (GDBusConnection       *connection,
                    const gchar           *sender,
                    const gchar           *object_path,
                    const gchar           *interface_name,
                    const gchar           *method_name,
                    GVariant              *parameters,
                    GDBusMethodInvocation *invocation,
                    gpointer               user_data)
{
  guint method_id;
  method_id = lookup_method_id_from_method_name (method_name);
  switch (method_id)
    {
    case __HELLO_WORLD_METHOD:
      {
        FooBar *object = FOO_BAR (user_data);
        gboolean handled;
        const gchar *arg_greeting;
        g_variant_get (parameters,
                       "(&s)",
                       &arg_greeting);
        g_signal_emit (object,
                       signals[method_id],
                       0, invocation, arg_greeting, &handled);
        if (!handled)
          goto not_implemented;
      }
      break;

    case __TEST_PRIMITIVE_TYPES_METHOD:
      {
        FooBar *object = FOO_BAR (user_data);
        gboolean handled;
        guchar arg_val_byte;
        gboolean arg_val_boolean;
        gint16 arg_val_int16;
        guint16 arg_val_uint16;
        gint arg_val_int32;
        guint arg_val_uint32;
        gint64 arg_val_int64;
        guint64 arg_val_uint64;
        gdouble arg_val_double;
        const gchar *arg_val_string;
        const gchar *arg_val_objpath;
        const gchar *arg_val_signature;
        g_variant_get (parameters,
                       "(ybnqiuxtd&s&o&g)",
                       &arg_val_byte,
                       &arg_val_boolean,
                       &arg_val_int16,
                       &arg_val_uint16,
                       &arg_val_int32,
                       &arg_val_uint32,
                       &arg_val_int64,
                       &arg_val_uint64,
                       &arg_val_double,
                       &arg_val_string,
                       &arg_val_objpath,
                       &arg_val_signature);
        g_signal_emit (object,
                       signals[method_id],
                       0, invocation, arg_val_byte, arg_val_boolean, arg_val_int16, arg_val_uint16, arg_val_int32, arg_val_uint32, arg_val_int64, arg_val_uint64, arg_val_double, arg_val_string, arg_val_objpath, arg_val_signature, &handled);
        if (!handled)
          goto not_implemented;
      }
      break;

    case __TEST_NON_PRIMITIVE_TYPES_METHOD:
      {
        FooBar *object = FOO_BAR (user_data);
        gboolean handled;
        GVariant *arg_dict_s_to_s;
        GVariant *arg_dict_s_to_pairs;
        GVariant *arg_a_struct;
        const gchar* const *arg_array_of_strings;
        GVariant *arg_array_of_objpaths;
        GVariant *arg_array_of_signatures;
        g_variant_get (parameters,
                       "(***^a&s**)",
                       &arg_dict_s_to_s,
                       &arg_dict_s_to_pairs,
                       &arg_a_struct,
                       &arg_array_of_strings,
                       &arg_array_of_objpaths,
                       &arg_array_of_signatures);
        g_signal_emit (object,
                       signals[method_id],
                       0, invocation, arg_dict_s_to_s, arg_dict_s_to_pairs, arg_a_struct, arg_array_of_strings, arg_array_of_objpaths, arg_array_of_signatures, &handled);
        g_variant_unref ((gpointer) arg_dict_s_to_s);
        g_variant_unref ((gpointer) arg_dict_s_to_pairs);
        g_variant_unref ((gpointer) arg_a_struct);
        g_free ((gpointer) arg_array_of_strings);
        g_variant_unref ((gpointer) arg_array_of_objpaths);
        g_variant_unref ((gpointer) arg_array_of_signatures);
        if (!handled)
          goto not_implemented;
      }
      break;

    case __REQUEST_SIGNAL_EMISSION_METHOD:
      {
        FooBar *object = FOO_BAR (user_data);
        gboolean handled;
        gint arg_which_one;
        g_variant_get (parameters,
                       "(i)",
                       &arg_which_one);
        g_signal_emit (object,
                       signals[method_id],
                       0, invocation, arg_which_one, &handled);
        if (!handled)
          goto not_implemented;
      }
      break;

    case __REQUEST_MULTI_PROPERTY_MODS_METHOD:
      {
        FooBar *object = FOO_BAR (user_data);
        gboolean handled;
        g_signal_emit (object,
                       signals[method_id],
                       0, invocation, &handled);
        if (!handled)
          goto not_implemented;
      }
      break;

    default:
not_implemented:
      g_dbus_method_invocation_return_error (invocation,
                                             G_DBUS_ERROR,
                                             G_DBUS_ERROR_NOT_SUPPORTED,
                                             "Method `%s' is not implemented",
                                             method_name);
      break;
    }
};

static GVariant *
get_property (GDBusConnection  *connection,
              const gchar      *sender,
              const gchar      *object_path,
              const gchar      *interface_name,
              const gchar      *property_name,
              GError          **error,
              gpointer          user_data)
{
  GVariant *ret;
  guint prop_id;
  prop_id = lookup_property_id_from_property_name (property_name);
  ret = NULL;
  switch (prop_id)
    {
    case PROP_Y:
      {
        guchar prop_val;
        g_object_get (G_OBJECT (user_data), "y", &prop_val, NULL);
        ret = g_variant_new ("y", prop_val);
      }
      break;

    case PROP_B:
      {
        gboolean prop_val;
        g_object_get (G_OBJECT (user_data), "b", &prop_val, NULL);
        ret = g_variant_new ("b", prop_val);
      }
      break;

    case PROP_N:
      {
        gint prop_val;
        g_object_get (G_OBJECT (user_data), "n", &prop_val, NULL);
        ret = g_variant_new ("n", prop_val);
      }
      break;

    case PROP_Q:
      {
        guint prop_val;
        g_object_get (G_OBJECT (user_data), "q", &prop_val, NULL);
        ret = g_variant_new ("q", prop_val);
      }
      break;

    case PROP_I:
      {
        gint prop_val;
        g_object_get (G_OBJECT (user_data), "i", &prop_val, NULL);
        ret = g_variant_new ("i", prop_val);
      }
      break;

    case PROP_U:
      {
        guint prop_val;
        g_object_get (G_OBJECT (user_data), "u", &prop_val, NULL);
        ret = g_variant_new ("u", prop_val);
      }
      break;

    case PROP_X:
      {
        gint64 prop_val;
        g_object_get (G_OBJECT (user_data), "x", &prop_val, NULL);
        ret = g_variant_new ("x", prop_val);
      }
      break;

    case PROP_T:
      {
        guint64 prop_val;
        g_object_get (G_OBJECT (user_data), "t", &prop_val, NULL);
        ret = g_variant_new ("t", prop_val);
      }
      break;

    case PROP_D:
      {
        gdouble prop_val;
        g_object_get (G_OBJECT (user_data), "d", &prop_val, NULL);
        ret = g_variant_new ("d", prop_val);
      }
      break;

    case PROP_S:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "s", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("s", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_O:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "o", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("o", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_G:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "g", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("g", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_AY:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "ay", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    case PROP_AS:
      {
        gchar **prop_val;
        g_object_get (G_OBJECT (user_data), "as", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("^as", prop_val);
            g_strfreev (prop_val);
          }
      }
      break;

    case PROP_AO:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "ao", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    case PROP_AG:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "ag", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    case PROP_FINALLY_NORMAL_NAME:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "finally-normal-name", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("s", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_READONLY_PROPERTY:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "readonly-property", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("s", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_WRITEONLY_PROPERTY:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "writeonly-property", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("s", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_UNSET_I:
      {
        gint prop_val;
        g_object_get (G_OBJECT (user_data), "unset-i", &prop_val, NULL);
        ret = g_variant_new ("i", prop_val);
      }
      break;

    case PROP_UNSET_D:
      {
        gdouble prop_val;
        g_object_get (G_OBJECT (user_data), "unset-d", &prop_val, NULL);
        ret = g_variant_new ("d", prop_val);
      }
      break;

    case PROP_UNSET_S:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-s", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("s", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_UNSET_O:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-o", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("o", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_UNSET_G:
      {
        gchar *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-g", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("g", prop_val);
            g_free (prop_val);
          }
      }
      break;

    case PROP_UNSET_AY:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-ay", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    case PROP_UNSET_AS:
      {
        gchar **prop_val;
        g_object_get (G_OBJECT (user_data), "unset-as", &prop_val, NULL);
        if (prop_val != NULL)
          {
            ret = g_variant_new ("^as", prop_val);
            g_strfreev (prop_val);
          }
      }
      break;

    case PROP_UNSET_AO:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-ao", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    case PROP_UNSET_AG:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-ag", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    case PROP_UNSET_STRUCT:
      {
        GVariant *prop_val;
        g_object_get (G_OBJECT (user_data), "unset-struct", &prop_val, NULL);
        ret = prop_val;
      }
      break;

    default:
      g_assert_not_reached ();
      break;
    }

  if (ret == NULL)
    {
      GVariant *empty;
      GDBusPropertyInfo *property_info;
      const GVariantType *type;
      property_info = g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_bar_interface_info, property_name);
      type = G_VARIANT_TYPE (property_info->signature);
      empty = g_variant_new_from_data (type, NULL, 0, FALSE, NULL, NULL);
      ret = g_variant_get_normal_form (empty);
      g_variant_unref (empty);
    }

  return ret;
};

static gboolean
set_property (GDBusConnection  *connection,
              const gchar      *sender,
              const gchar      *object_path,
              const gchar      *interface_name,
              const gchar      *property_name,
              GVariant         *value,
              GError          **error,
              gpointer          user_data)
{
  gboolean ret;
  guint prop_id;
  prop_id = lookup_property_id_from_property_name (property_name);
  ret = TRUE;
  switch (prop_id)
    {
    case PROP_Y:
      {
        guchar prop_val;
        g_variant_get (value, "y", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "y", prop_val, NULL);
      }
      break;

    case PROP_B:
      {
        gboolean prop_val;
        g_variant_get (value, "b", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "b", prop_val, NULL);
      }
      break;

    case PROP_N:
      {
        gint16 prop_val;
        g_variant_get (value, "n", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "n", prop_val, NULL);
      }
      break;

    case PROP_Q:
      {
        guint16 prop_val;
        g_variant_get (value, "q", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "q", prop_val, NULL);
      }
      break;

    case PROP_I:
      {
        gint prop_val;
        g_variant_get (value, "i", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "i", prop_val, NULL);
      }
      break;

    case PROP_U:
      {
        guint prop_val;
        g_variant_get (value, "u", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "u", prop_val, NULL);
      }
      break;

    case PROP_X:
      {
        gint64 prop_val;
        g_variant_get (value, "x", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "x", prop_val, NULL);
      }
      break;

    case PROP_T:
      {
        guint64 prop_val;
        g_variant_get (value, "t", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "t", prop_val, NULL);
      }
      break;

    case PROP_D:
      {
        gdouble prop_val;
        g_variant_get (value, "d", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "d", prop_val, NULL);
      }
      break;

    case PROP_S:
      {
        const gchar *prop_val;
        g_variant_get (value, "&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "s", prop_val, NULL);
      }
      break;

    case PROP_O:
      {
        const gchar *prop_val;
        g_variant_get (value, "&o", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "o", prop_val, NULL);
      }
      break;

    case PROP_G:
      {
        const gchar *prop_val;
        g_variant_get (value, "&g", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "g", prop_val, NULL);
      }
      break;

    case PROP_AY:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "ay", prop_val, NULL);
      }
      break;

    case PROP_AS:
      {
        const gchar* const *prop_val;
        g_variant_get (value, "^a&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "as", prop_val, NULL);
        g_free ((gpointer) prop_val);
      }
      break;

    case PROP_AO:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "ao", prop_val, NULL);
      }
      break;

    case PROP_AG:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "ag", prop_val, NULL);
      }
      break;

    case PROP_FINALLY_NORMAL_NAME:
      {
        const gchar *prop_val;
        g_variant_get (value, "&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "finally-normal-name", prop_val, NULL);
      }
      break;

    case PROP_READONLY_PROPERTY:
      {
        const gchar *prop_val;
        g_variant_get (value, "&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "readonly-property", prop_val, NULL);
      }
      break;

    case PROP_WRITEONLY_PROPERTY:
      {
        const gchar *prop_val;
        g_variant_get (value, "&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "writeonly-property", prop_val, NULL);
      }
      break;

    case PROP_UNSET_I:
      {
        gint prop_val;
        g_variant_get (value, "i", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "unset-i", prop_val, NULL);
      }
      break;

    case PROP_UNSET_D:
      {
        gdouble prop_val;
        g_variant_get (value, "d", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "unset-d", prop_val, NULL);
      }
      break;

    case PROP_UNSET_S:
      {
        const gchar *prop_val;
        g_variant_get (value, "&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "unset-s", prop_val, NULL);
      }
      break;

    case PROP_UNSET_O:
      {
        const gchar *prop_val;
        g_variant_get (value, "&o", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "unset-o", prop_val, NULL);
      }
      break;

    case PROP_UNSET_G:
      {
        const gchar *prop_val;
        g_variant_get (value, "&g", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "unset-g", prop_val, NULL);
      }
      break;

    case PROP_UNSET_AY:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "unset-ay", prop_val, NULL);
      }
      break;

    case PROP_UNSET_AS:
      {
        const gchar* const *prop_val;
        g_variant_get (value, "^a&s", &prop_val, NULL);
        g_object_set (G_OBJECT (user_data), "unset-as", prop_val, NULL);
        g_free ((gpointer) prop_val);
      }
      break;

    case PROP_UNSET_AO:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "unset-ao", prop_val, NULL);
      }
      break;

    case PROP_UNSET_AG:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "unset-ag", prop_val, NULL);
      }
      break;

    case PROP_UNSET_STRUCT:
      {
        GVariant *prop_val;
        prop_val = value;
        g_object_set (G_OBJECT (user_data), "unset-struct", prop_val, NULL);
      }
      break;

    default:
      g_set_error (error,
                   G_DBUS_ERROR,
                   G_DBUS_ERROR_NOT_SUPPORTED,
                   "This implementation does not support property `%s'",
                   property_name);
      ret = FALSE;
      break;
    }

  return ret;
};

static const GDBusInterfaceVTable foo_bar_interface_vtable =
{
  handle_method_call,
  get_property,
  set_property,
};

static gboolean
emit_notifications_in_idle (gpointer user_data)
{
  GObject *object = G_OBJECT (user_data);
  GDBusConnection *connection;
  const gchar *path;
  GHashTable *notification_queue;
  GHashTableIter iter;
  const gchar *property_name;
  GVariant *value;
  GVariantBuilder *builder;
  GVariantBuilder *invalidated_builder;
  GHashTable *pvc;
  gboolean has_changes;

  notification_queue = g_object_get_data (object, "gdbus-codegen-notification-queue");
  path = g_object_get_data (object, "gdbus-codegen-path");
  connection = g_object_get_data (object, "gdbus-codegen-connection");
  pvc = g_object_get_data (object, "gdbus-codegen-pvc");
  g_assert (notification_queue != NULL && path != NULL && connection != NULL && pvc != NULL);

  builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
  invalidated_builder = g_variant_builder_new (G_VARIANT_TYPE ("as"));
  g_hash_table_iter_init (&iter, notification_queue);
  has_changes = FALSE;
  while (g_hash_table_iter_next (&iter, (gpointer) &property_name, (gpointer) &value))
    {
      GVariant *cached_value;
      cached_value = g_hash_table_lookup (pvc, property_name);
      if (cached_value == NULL || !g_variant_equal (cached_value, value))
        {
          g_hash_table_insert (pvc, (gpointer) property_name, (gpointer) g_variant_ref (value));
          g_variant_builder_add (builder, "{sv}", property_name, value);
          has_changes = TRUE;
        }
    }

  if (has_changes)
    {
      g_dbus_connection_emit_signal (connection,
                                     NULL,
                                     path,
                                     "org.freedesktop.DBus.Properties",
                                     "PropertiesChanged",
                                     g_variant_new ("(sa{sv}as)",
                                                    "org.project.Bar",
                                                    builder,
                                                    invalidated_builder),
                                     NULL);
    }
  else
    {
      g_variant_builder_unref (builder);
      g_variant_builder_unref (invalidated_builder);
    }

  g_hash_table_remove_all (notification_queue);
  g_object_set_data (object, "gdbus-codegen-notification-idle-id", GUINT_TO_POINTER (0));
  return FALSE;
}

static void
queue_notification (GObject     *object,
                    const gchar *property_name,
                    GVariant    *value)
{
  GHashTable *notification_queue;
  guint idle_id;
  notification_queue = g_object_get_data (object, "gdbus-codegen-notification-queue");
  if (notification_queue == NULL)
    {
      notification_queue = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_variant_unref);
      g_object_set_data_full (object, "gdbus-codegen-notification-queue", notification_queue, (GDestroyNotify) g_hash_table_unref);
    }
  g_hash_table_insert (notification_queue, (gpointer) property_name, (gpointer) value); /* adopts value */
  idle_id = GPOINTER_TO_UINT (g_object_get_data (object, "gdbus-codegen-notification-idle-id"));
  if (idle_id == 0)
    {
      GSource *idle_source;
      idle_source = g_idle_source_new ();
      g_source_set_priority (idle_source, G_PRIORITY_DEFAULT);
      g_source_set_callback (idle_source,
                             emit_notifications_in_idle,
                             g_object_ref (object),
                             (GDestroyNotify) g_object_unref);
      idle_id = g_source_attach (idle_source, g_main_context_get_thread_default ());
      g_source_unref (idle_source);
      g_object_set_data (object, "gdbus-codegen-notification-idle-id", GUINT_TO_POINTER (idle_id));
    }
}

/**
 * foo_bar_drain_notify:
 * @object: A #FooBar that is exported.
 *
 * If @object has queued notifications, empty the queue forcing
 * the <literal>PropertiesChanged</literal> signal to be emitted.
 * See <xref linkend="FooBar.description"/> for more background information.
 */
void
foo_bar_drain_notify (FooBar *object)
{
  gint idle_id;
  idle_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (object), "gdbus-codegen-notification-idle-id"));
  if (idle_id > 0)
    {
      emit_notifications_in_idle (object);
      g_source_remove (idle_id);
    }
}

static void
on_notify (GObject    *object,
           GParamSpec *pspec,
           gpointer    user_data)
{
  GDBusConnection *connection;
  const gchar *path;
  GVariant *value;
  const gchar *property_name;

  path = g_object_get_data (object, "gdbus-codegen-path");
  connection = g_object_get_data (object, "gdbus-codegen-connection");
  if (connection == NULL || path == NULL)
    goto out;
  property_name = lookup_property_name_from_property_gname (pspec->name);
  if (property_name == NULL)
    goto out;

  value = get_property (connection, NULL, path, "org.project.Bar", property_name, NULL, object);
  queue_notification (object, property_name, g_variant_ref_sink (value));
out:
  ;
}

static void
on_object_unregistered (GObject *object)
{
  gint idle_id;
  idle_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (object), "gdbus-codegen-notification-idle-id"));
  if (idle_id > 0)
    {
      g_source_remove (idle_id);
    }
  g_object_set_data (G_OBJECT (object), "gdbus-codegen-path", NULL);
  g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", NULL);
  g_signal_handlers_disconnect_by_func (object, on_notify, NULL);
}

/**
 * foo_bar_register_object:
 * @object: An instance of a #GObject<!-- -->-derived type implementing the #FooBar interface.
 * @connection: A #GDBusConnection.
 * @object_path: The object to register the object at.
 * @error: Return location for error or %NULL.
 *
 * Registers @object at @object_path on @connection.
 *
 * See <xref linkend="FooBar.description"/>
 * for how properties, methods and signals are handled.
 *
 * Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
 */
guint
foo_bar_register_object (FooBar *object,
           GDBusConnection *connection,
           const gchar *object_path,
           GError **error)
{
  G_GNUC_UNUSED GVariant *value;
  GHashTable *pvc;

  pvc = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_variant_unref);
  value = get_property (connection, NULL, object_path, "org.project.Bar", "y", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "y", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "b", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "b", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "n", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "n", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "q", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "q", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "i", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "i", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "u", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "u", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "x", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "x", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "t", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "t", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "d", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "d", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "s", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "s", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "o", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "o", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "g", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "g", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "ay", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "ay", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "as", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "as", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "ao", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "ao", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "ag", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "ag", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "FinallyNormalName", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "FinallyNormalName", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "ReadonlyProperty", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "ReadonlyProperty", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "WriteonlyProperty", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "WriteonlyProperty", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_i", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_i", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_d", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_d", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_s", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_s", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_o", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_o", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_g", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_g", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_ay", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_ay", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_as", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_as", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_ao", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_ao", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_ag", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_ag", value);
    }
  value = get_property (connection, NULL, object_path, "org.project.Bar", "unset_struct", NULL, object);
  if (value != NULL)
    {
      g_variant_ref_sink (value);
      g_hash_table_insert (pvc, "unset_struct", value);
    }

  g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-path", (gpointer) g_strdup (object_path), g_free);
  g_object_set_data (G_OBJECT (object), "gdbus-codegen-connection", (gpointer) connection);
  g_object_set_data_full (G_OBJECT (object), "gdbus-codegen-pvc", (gpointer) pvc, (GDestroyNotify) g_hash_table_unref);
  g_signal_connect (object, "notify", G_CALLBACK (on_notify), NULL);
  return g_dbus_connection_register_object (connection,
          object_path,
          (GDBusInterfaceInfo *) &_foo_bar_interface_info,
          &foo_bar_interface_vtable,
          object,
          (GDestroyNotify) on_object_unregistered,
          error);
}

/**
 * foo_bar_interface_info:
 *
 * Gets interface description for the <literal>org.project.Bar</literal> D-Bus interface.
 *
 * Returns: A #GDBusInterfaceInfo. Do not free, the object is statically allocated.
 */
const GDBusInterfaceInfo *
foo_bar_interface_info (void)
{
  return &_foo_bar_interface_info;
}

/**
 * foo_bar_override_properties:
 * @klass: A #GObjectClass.
 * @property_id_begin: Property ID of first property to override.
 *
 * Convenience function to override properties for a #GObject<!-- -->-derived type that implements #FooBar.
 *
 * Typical usage of this function is:
 * |[
 * enum
 * {
 *   PROP_0,
 *   PROP_SOME_UNRELATED_PROPERTY,
 *   PROP_ANOTHER_UNRELATED_PROPERTY,
 *   [...]
 *
 *   /<!-- -->* Properties from the FooBar interface *<!-- -->/
  *   PROP_FOO_BAR_Y,
  *   PROP_FOO_BAR_B,
  *   PROP_FOO_BAR_N,
  *   PROP_FOO_BAR_Q,
  *   PROP_FOO_BAR_I,
  *   PROP_FOO_BAR_U,
  *   PROP_FOO_BAR_X,
  *   PROP_FOO_BAR_T,
  *   PROP_FOO_BAR_D,
  *   PROP_FOO_BAR_S,
  *   PROP_FOO_BAR_O,
  *   PROP_FOO_BAR_G,
  *   PROP_FOO_BAR_AY,
  *   PROP_FOO_BAR_AS,
  *   PROP_FOO_BAR_AO,
  *   PROP_FOO_BAR_AG,
  *   PROP_FOO_BAR_FINALLY_NORMAL_NAME,
  *   PROP_FOO_BAR_READONLY_PROPERTY,
  *   PROP_FOO_BAR_WRITEONLY_PROPERTY,
  *   PROP_FOO_BAR_UNSET_I,
  *   PROP_FOO_BAR_UNSET_D,
  *   PROP_FOO_BAR_UNSET_S,
  *   PROP_FOO_BAR_UNSET_O,
  *   PROP_FOO_BAR_UNSET_G,
  *   PROP_FOO_BAR_UNSET_AY,
  *   PROP_FOO_BAR_UNSET_AS,
  *   PROP_FOO_BAR_UNSET_AO,
  *   PROP_FOO_BAR_UNSET_AG,
  *   PROP_FOO_BAR_UNSET_STRUCT,
 *   [...]
 * };
 *]|
 * and in the <literal>class_init<!-- -->()</literal> function:
 *|[
 *  g_warn_if_fail (foo_bar_override_properties (gobject_class, PROP_FOO_BAR_Y) == 
 *                  PROP_FOO_BAR_UNSET_STRUCT);
 *]|
 *
 * Returns: Property ID of the last overridden property.
 */
guint
foo_bar_override_properties (GObjectClass *klass, guint property_id_begin)
{
  g_object_class_override_property (klass, property_id_begin++, "y");
  g_object_class_override_property (klass, property_id_begin++, "b");
  g_object_class_override_property (klass, property_id_begin++, "n");
  g_object_class_override_property (klass, property_id_begin++, "q");
  g_object_class_override_property (klass, property_id_begin++, "i");
  g_object_class_override_property (klass, property_id_begin++, "u");
  g_object_class_override_property (klass, property_id_begin++, "x");
  g_object_class_override_property (klass, property_id_begin++, "t");
  g_object_class_override_property (klass, property_id_begin++, "d");
  g_object_class_override_property (klass, property_id_begin++, "s");
  g_object_class_override_property (klass, property_id_begin++, "o");
  g_object_class_override_property (klass, property_id_begin++, "g");
  g_object_class_override_property (klass, property_id_begin++, "ay");
  g_object_class_override_property (klass, property_id_begin++, "as");
  g_object_class_override_property (klass, property_id_begin++, "ao");
  g_object_class_override_property (klass, property_id_begin++, "ag");
  g_object_class_override_property (klass, property_id_begin++, "finally-normal-name");
  g_object_class_override_property (klass, property_id_begin++, "readonly-property");
  g_object_class_override_property (klass, property_id_begin++, "writeonly-property");
  g_object_class_override_property (klass, property_id_begin++, "unset-i");
  g_object_class_override_property (klass, property_id_begin++, "unset-d");
  g_object_class_override_property (klass, property_id_begin++, "unset-s");
  g_object_class_override_property (klass, property_id_begin++, "unset-o");
  g_object_class_override_property (klass, property_id_begin++, "unset-g");
  g_object_class_override_property (klass, property_id_begin++, "unset-ay");
  g_object_class_override_property (klass, property_id_begin++, "unset-as");
  g_object_class_override_property (klass, property_id_begin++, "unset-ao");
  g_object_class_override_property (klass, property_id_begin++, "unset-ag");
  g_object_class_override_property (klass, property_id_begin++, "unset-struct");
  return property_id_begin - 1;
}


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

static void proxy_iface_init (FooBarIface *iface);

G_DEFINE_TYPE_WITH_CODE (FooBarProxy, foo_bar_proxy, G_TYPE_DBUS_PROXY,
                         G_IMPLEMENT_INTERFACE (FOO_TYPE_BAR, proxy_iface_init));

static void
foo_bar_proxy_init (FooBarProxy *proxy)
{
  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy),
                                   (GDBusInterfaceInfo *) &_foo_bar_interface_info);
}

static void
g_signal (GDBusProxy  *proxy,
          const gchar *sender_name,
          const gchar *signal_name,
          GVariant    *parameters)
{
  guint signal_id;
  signal_id = lookup_signal_id_from_signal_name (signal_name);
  switch (signal_id)
    {
    case __TEST_SIGNAL_SIGNAL:
      {
        gint arg_val_int32;
        const gchar* const *arg_array_of_strings;
        GVariant *arg_dict_s_to_pairs;
        g_variant_get (parameters,
                       "(i^a&s*)",
                       &arg_val_int32,
                       &arg_array_of_strings,
                       &arg_dict_s_to_pairs);
        g_signal_emit (proxy,
                       signals[signal_id],
                       0, arg_val_int32, arg_array_of_strings, arg_dict_s_to_pairs);
        g_free ((gpointer) arg_array_of_strings);
        g_variant_unref ((gpointer) arg_dict_s_to_pairs);
      }
      break;

    case __ANOTHER_SIGNAL_SIGNAL:
      {
        const gchar *arg_word;
        g_variant_get (parameters,
                       "(&s)",
                       &arg_word);
        g_signal_emit (proxy,
                       signals[signal_id],
                       0, arg_word);
      }
      break;

    }
}

static void
foo_bar_proxy_get_property (GObject      *object,
                       guint         prop_id,
                       GValue       *value,
                       GParamSpec   *pspec)
{
  G_GNUC_UNUSED GVariant *cached;
  switch (prop_id)
    {
    case PROP_Y:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "y");
      if (cached != NULL)
        {
          g_value_set_uchar (value, g_variant_get_byte (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `y' is not in cache");
        }
      break;

    case PROP_B:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "b");
      if (cached != NULL)
        {
          g_value_set_boolean (value, g_variant_get_boolean (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `b' is not in cache");
        }
      break;

    case PROP_N:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "n");
      if (cached != NULL)
        {
          g_value_set_int (value, g_variant_get_int16 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `n' is not in cache");
        }
      break;

    case PROP_Q:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "q");
      if (cached != NULL)
        {
          g_value_set_uint (value, g_variant_get_uint16 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `q' is not in cache");
        }
      break;

    case PROP_I:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "i");
      if (cached != NULL)
        {
          g_value_set_int (value, g_variant_get_int32 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `i' is not in cache");
        }
      break;

    case PROP_U:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "u");
      if (cached != NULL)
        {
          g_value_set_uint (value, g_variant_get_uint32 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `u' is not in cache");
        }
      break;

    case PROP_X:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "x");
      if (cached != NULL)
        {
          g_value_set_int64 (value, g_variant_get_int64 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `x' is not in cache");
        }
      break;

    case PROP_T:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "t");
      if (cached != NULL)
        {
          g_value_set_uint64 (value, g_variant_get_uint64 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `t' is not in cache");
        }
      break;

    case PROP_D:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "d");
      if (cached != NULL)
        {
          g_value_set_double (value, g_variant_get_double (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `d' is not in cache");
        }
      break;

    case PROP_S:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "s");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `s' is not in cache");
        }
      break;

    case PROP_O:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "o");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `o' is not in cache");
        }
      break;

    case PROP_G:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "g");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `g' is not in cache");
        }
      break;

    case PROP_AY:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "ay");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `ay' is not in cache");
        }
      break;

    case PROP_AS:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "as");
      if (cached != NULL)
        {
          g_value_set_boxed (value, g_variant_get_strv (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `as' is not in cache");
        }
      break;

    case PROP_AO:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "ao");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `ao' is not in cache");
        }
      break;

    case PROP_AG:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "ag");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `ag' is not in cache");
        }
      break;

    case PROP_FINALLY_NORMAL_NAME:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "FinallyNormalName");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `FinallyNormalName' is not in cache");
        }
      break;

    case PROP_READONLY_PROPERTY:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "ReadonlyProperty");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `ReadonlyProperty' is not in cache");
        }
      break;

    case PROP_UNSET_I:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_i");
      if (cached != NULL)
        {
          g_value_set_int (value, g_variant_get_int32 (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_i' is not in cache");
        }
      break;

    case PROP_UNSET_D:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_d");
      if (cached != NULL)
        {
          g_value_set_double (value, g_variant_get_double (cached));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_d' is not in cache");
        }
      break;

    case PROP_UNSET_S:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_s");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_s' is not in cache");
        }
      break;

    case PROP_UNSET_O:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_o");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_o' is not in cache");
        }
      break;

    case PROP_UNSET_G:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_g");
      if (cached != NULL)
        {
          g_value_set_string (value, g_variant_get_string (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_g' is not in cache");
        }
      break;

    case PROP_UNSET_AY:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_ay");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_ay' is not in cache");
        }
      break;

    case PROP_UNSET_AS:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_as");
      if (cached != NULL)
        {
          g_value_set_boxed (value, g_variant_get_strv (cached, NULL));
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_as' is not in cache");
        }
      break;

    case PROP_UNSET_AO:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_ao");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_ao' is not in cache");
        }
      break;

    case PROP_UNSET_AG:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_ag");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_ag' is not in cache");
        }
      break;

    case PROP_UNSET_STRUCT:
      cached = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), "unset_struct");
      if (cached != NULL)
        {
          g_value_set_variant (value, cached);
          g_variant_unref (cached);
        }
      else
        {
          g_warning ("Property `unset_struct' is not in cache");
        }
      break;


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

static void
property_set_cb (GDBusProxy   *proxy,
                 GAsyncResult *res,
                 gpointer      user_data)
{
  const gchar *property_name = user_data;
  GError *error;
  GVariant *result;

  error = NULL;
  result = g_dbus_proxy_call_finish (proxy, res, &error);
  if (result == NULL)
    {
      g_warning ("Error setting property `%s': %s", property_name, error->message);
      g_error_free (error);
    }
  else
    {
      g_variant_unref (result);
    }
}

static void
foo_bar_proxy_set_property (GObject      *object,
                       guint         prop_id,
                       const GValue *value,
                       GParamSpec   *pspec)
{
  GVariant *new_value;
  const gchar *property_name;
  new_value = NULL;
  property_name = NULL;
  switch (prop_id)
    {
    case PROP_Y:
      new_value = g_variant_new_byte (g_value_get_double (value));
      property_name = "y";
      break;

    case PROP_B:
      new_value = g_variant_new_boolean (g_value_get_boolean (value));
      property_name = "b";
      break;

    case PROP_N:
      new_value = g_variant_new_int16 (g_value_get_int (value));
      property_name = "n";
      break;

    case PROP_Q:
      new_value = g_variant_new_uint16 (g_value_get_uint (value));
      property_name = "q";
      break;

    case PROP_I:
      new_value = g_variant_new_int32 (g_value_get_int (value));
      property_name = "i";
      break;

    case PROP_U:
      new_value = g_variant_new_uint32 (g_value_get_uint (value));
      property_name = "u";
      break;

    case PROP_X:
      new_value = g_variant_new_int64 (g_value_get_int64 (value));
      property_name = "x";
      break;

    case PROP_T:
      new_value = g_variant_new_uint64 (g_value_get_uint64 (value));
      property_name = "t";
      break;

    case PROP_D:
      new_value = g_variant_new_double (g_value_get_double (value));
      property_name = "d";
      break;

    case PROP_S:
      new_value = g_variant_new ("s", g_value_get_string (value));
      property_name = "s";
      break;

    case PROP_O:
      new_value = g_variant_new ("o", g_value_get_string (value));
      property_name = "o";
      break;

    case PROP_G:
      new_value = g_variant_new ("g", g_value_get_string (value));
      property_name = "g";
      break;

    case PROP_AY:
      new_value = g_value_dup_variant (value);
      property_name = "ay";
      break;

    case PROP_AS:
      new_value = g_variant_new ("^as", g_value_get_boxed (value));
      property_name = "as";
      break;

    case PROP_AO:
      new_value = g_value_dup_variant (value);
      property_name = "ao";
      break;

    case PROP_AG:
      new_value = g_value_dup_variant (value);
      property_name = "ag";
      break;

    case PROP_FINALLY_NORMAL_NAME:
      new_value = g_variant_new ("s", g_value_get_string (value));
      property_name = "FinallyNormalName";
      break;

    case PROP_WRITEONLY_PROPERTY:
      new_value = g_variant_new ("s", g_value_get_string (value));
      property_name = "WriteonlyProperty";
      break;

    case PROP_UNSET_I:
      new_value = g_variant_new_int32 (g_value_get_int (value));
      property_name = "unset_i";
      break;

    case PROP_UNSET_D:
      new_value = g_variant_new_double (g_value_get_double (value));
      property_name = "unset_d";
      break;

    case PROP_UNSET_S:
      new_value = g_variant_new ("s", g_value_get_string (value));
      property_name = "unset_s";
      break;

    case PROP_UNSET_O:
      new_value = g_variant_new ("o", g_value_get_string (value));
      property_name = "unset_o";
      break;

    case PROP_UNSET_G:
      new_value = g_variant_new ("g", g_value_get_string (value));
      property_name = "unset_g";
      break;

    case PROP_UNSET_AY:
      new_value = g_value_dup_variant (value);
      property_name = "unset_ay";
      break;

    case PROP_UNSET_AS:
      new_value = g_variant_new ("^as", g_value_get_boxed (value));
      property_name = "unset_as";
      break;

    case PROP_UNSET_AO:
      new_value = g_value_dup_variant (value);
      property_name = "unset_ao";
      break;

    case PROP_UNSET_AG:
      new_value = g_value_dup_variant (value);
      property_name = "unset_ag";
      break;

    case PROP_UNSET_STRUCT:
      new_value = g_value_dup_variant (value);
      property_name = "unset_struct";
      break;


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

  if (new_value != NULL)
    {
      g_variant_ref_sink (new_value);
      g_dbus_proxy_call (G_DBUS_PROXY (object),
                         "org.freedesktop.DBus.Properties.Set",
                         g_variant_new ("(ssv)",
                                        "org.project.Bar",
                                        property_name,
                                        new_value),
                         G_DBUS_CALL_FLAGS_NONE,
                         -1,
                         NULL,
                         (GAsyncReadyCallback) property_set_cb,
                         (gpointer) property_name);
      g_variant_unref (new_value);
    }

}

static void
g_properties_changed (GDBusProxy         *proxy,
                      GVariant           *changed_properties,
                      const gchar* const *invalidated_properties)
{
  guint n;
  const gchar *key;
  GVariantIter *iter;
  const gchar *gname;

  g_variant_get (changed_properties, "a{sv}", &iter);
  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
    {
      gname = lookup_property_gname_from_property_name (key);
      if (gname != NULL)
        g_object_notify (G_OBJECT (proxy), gname);
    }

  for (n = 0; invalidated_properties[n] != NULL; n++)
    {
      gname = lookup_property_gname_from_property_name (invalidated_properties[n]);
      if (gname != NULL)
        g_object_notify (G_OBJECT (proxy), gname);
    }

}

static void
foo_bar_proxy_class_init (FooBarProxyClass *klass)
{
  GObjectClass *gobject_class;
  GDBusProxyClass *proxy_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->get_property = foo_bar_proxy_get_property;
  gobject_class->set_property = foo_bar_proxy_set_property;

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


  foo_bar_override_properties (gobject_class, 1);
}

static void
proxy_iface_init (FooBarIface *iface)
{
}


/**
 * foo_bar_proxy_new:
 * @connection: A #GDBusConnection.
 * @flags: Flags used when constructing the proxy.
 * @name: A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: Callback function to invoke when the proxy is ready.
 * @user_data: User data to pass to @callback.
 *
 * Like g_dbus_proxy_new() but returns a #FooBarProxy.
 *
 * This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use foo_bar_proxy_new_finish() to get the result.
 */
void foo_bar_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 (FOO_TYPE_BAR_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.project.Bar",
                              NULL);
}

/**
 * foo_bar_proxy_new_finish:
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to foo_bar_proxy_new().
 * @error: Return location for error or %NULL.
 *
 * Finishes creating a #FooBarProxy.
 *
 * Returns: A #FooBarProxy or %NULL if @error is set. Free with g_object_unref().
 */
FooBar *foo_bar_proxy_new_finish (GAsyncResult  *res,
                        GError       **error)
{
  GObject *object;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  g_assert (source_object != NULL);
  object = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object),
                                        res,
                                        error);
  g_object_unref (source_object);
  if (object != NULL)
    return FOO_BAR (object);
  else
    return NULL;
}

/**
 * foo_bar_proxy_new_sync:
 * @connection: A #GDBusConnection.
 * @flags: Flags used when constructing the proxy.
 * @name: A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 * @object_path: An object path.
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Like g_dbus_proxy_new_sync() but returns a #FooBarProxy.
 *
 * This is a synchronous failable constructor. See foo_bar_proxy_new() and foo_bar_proxy_new_finish() for the asynchronous version.
 *
 * Returns: A #FooBarProxy or %NULL if error is set. Free with g_object_unref().
 */
FooBar *foo_bar_proxy_new_sync (GDBusConnection     *connection,
                       GDBusProxyFlags      flags,
                       const gchar         *name,
                       const gchar         *object_path,
                       GCancellable        *cancellable,
                       GError             **error)
{
  GInitable *initable;
  initable = g_initable_new (FOO_TYPE_BAR_PROXY,
                             cancellable,
                             error,
                             "g-flags", flags,
                             "g-name", name,
                             "g-connection", connection,
                             "g-object-path", object_path,
                             "g-interface-name", "org.project.Bar",
                             NULL);
  if (initable != NULL)
    return FOO_BAR (initable);
  else
    return NULL;
}


/**
 * foo_bar_proxy_new_for_bus:
 * @bus_type: A #GBusType.
 * @flags: Flags used when constructing the proxy.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: A #GCancellable or %NULL.
 * @callback: Callback function to invoke when the proxy is ready.
 * @user_data: User data to pass to @callback.
 *
 * Like g_dbus_proxy_new_for_bus() but returns a #FooBarProxy.
 *
 * This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use foo_bar_proxy_new_for_bus_finish() to get the result.
 */
void foo_bar_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 (FOO_TYPE_BAR_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.project.Bar",
                              NULL);
}

/**
 * foo_bar_proxy_new_for_bus_finish:
 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to foo_bar_proxy_new_for_bus().
 * @error: Return location for error or %NULL.
 *
 * Finishes creating a #FooBarProxy.
 *
 * Returns: A #FooBarProxy or %NULL if @error is set. Free with g_object_unref().
 */
FooBar *foo_bar_proxy_new_for_bus_finish (GAsyncResult  *res,
                                GError       **error)
{
  GObject *object;
  GObject *source_object;
  source_object = g_async_result_get_source_object (res);
  g_assert (source_object != NULL);
  object = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object),
                                        res,
                                        error);
  g_object_unref (source_object);
  if (object != NULL)
    return FOO_BAR (object);
  else
    return NULL;
}

/**
 * foo_bar_proxy_new_for_bus_sync:
 * @bus_type: A #GBusType.
 * @flags: Flags used when constructing the proxy.
 * @name: A bus name (well-known or unique).
 * @object_path: An object path.
 * @cancellable: A #GCancellable or %NULL.
 * @error: Return location for error or %NULL.
 *
 * Like g_dbus_proxy_new_for_bus_sync() but returns a #FooBarProxy.
 *
 * This is a synchronous failable constructor. See foo_bar_proxy_new_for_bus() and foo_bar_proxy_new_for_bus_finish() for the asynchronous version.
 *
 * Returns: A #FooBarProxy or %NULL if error is set. Free with g_object_unref().
 */
FooBar *foo_bar_proxy_new_for_bus_sync (GBusType             bus_type,
                               GDBusProxyFlags      flags,
                               const gchar         *name,
                               const gchar         *object_path,
                               GCancellable        *cancellable,
                               GError             **error)
{
  GInitable *initable;
  initable = g_initable_new (FOO_TYPE_BAR_PROXY,
                             cancellable,
                             error,
                             "g-flags", flags,
                             "g-name", name,
                             "g-bus-type", bus_type,
                             "g-object-path", object_path,
                             "g-interface-name", "org.project.Bar",
                             NULL);
  if (initable != NULL)
    return FOO_BAR (initable);
  else
    return NULL;
}


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

struct _FooBarStubPrivate
{
  guchar y;
  gboolean b;
  gint16 n;
  guint16 q;
  gint i;
  guint u;
  gint64 x;
  guint64 t;
  gdouble d;
  gchar *s;
  gchar *o;
  gchar *g;
  GVariant *ay;
  gchar **as;
  GVariant *ao;
  GVariant *ag;
  gchar *finally_normal_name;
  gchar *readonly_property;
  gchar *writeonly_property;
  gint unset_i;
  gdouble unset_d;
  gchar *unset_s;
  gchar *unset_o;
  gchar *unset_g;
  GVariant *unset_ay;
  gchar **unset_as;
  GVariant *unset_ao;
  GVariant *unset_ag;
  GVariant *unset_struct;
};

static void stub_iface_init (FooBarIface *iface);

G_DEFINE_TYPE_WITH_CODE (FooBarStub, foo_bar_stub, G_TYPE_OBJECT,
                         G_IMPLEMENT_INTERFACE (FOO_TYPE_BAR, stub_iface_init));

static void
foo_bar_stub_finalize (GObject *object)
{
  G_GNUC_UNUSED FooBarStub *stub = (FooBarStub *) object;
  g_free (stub->priv->s);
  g_free (stub->priv->o);
  g_free (stub->priv->g);
  if (stub->priv->ay != NULL)
    g_variant_unref (stub->priv->ay);
  if (stub->priv->as != NULL)
    g_strfreev (stub->priv->as);
  if (stub->priv->ao != NULL)
    g_variant_unref (stub->priv->ao);
  if (stub->priv->ag != NULL)
    g_variant_unref (stub->priv->ag);
  g_free (stub->priv->finally_normal_name);
  g_free (stub->priv->readonly_property);
  g_free (stub->priv->writeonly_property);
  g_free (stub->priv->unset_s);
  g_free (stub->priv->unset_o);
  g_free (stub->priv->unset_g);
  if (stub->priv->unset_ay != NULL)
    g_variant_unref (stub->priv->unset_ay);
  if (stub->priv->unset_as != NULL)
    g_strfreev (stub->priv->unset_as);
  if (stub->priv->unset_ao != NULL)
    g_variant_unref (stub->priv->unset_ao);
  if (stub->priv->unset_ag != NULL)
    g_variant_unref (stub->priv->unset_ag);
  if (stub->priv->unset_struct != NULL)
    g_variant_unref (stub->priv->unset_struct);
  if (G_OBJECT_CLASS (foo_bar_stub_parent_class)->finalize != NULL)
    G_OBJECT_CLASS (foo_bar_stub_parent_class)->finalize (object);
}

static void
foo_bar_stub_get_property (GObject      *object,
                      guint         prop_id,
                      GValue       *value,
                      GParamSpec   *pspec)
{
  G_GNUC_UNUSED FooBarStub *stub = (FooBarStub *) object;
  switch (prop_id)
    {
    case PROP_Y:
      g_value_set_uchar (value, stub->priv->y);
      break;

    case PROP_B:
      g_value_set_boolean (value, stub->priv->b);
      break;

    case PROP_N:
      g_value_set_int (value, stub->priv->n);
      break;

    case PROP_Q:
      g_value_set_uint (value, stub->priv->q);
      break;

    case PROP_I:
      g_value_set_int (value, stub->priv->i);
      break;

    case PROP_U:
      g_value_set_uint (value, stub->priv->u);
      break;

    case PROP_X:
      g_value_set_int64 (value, stub->priv->x);
      break;

    case PROP_T:
      g_value_set_uint64 (value, stub->priv->t);
      break;

    case PROP_D:
      g_value_set_double (value, stub->priv->d);
      break;

    case PROP_S:
      g_value_set_string (value, stub->priv->s);
      break;

    case PROP_O:
      g_value_set_string (value, stub->priv->o);
      break;

    case PROP_G:
      g_value_set_string (value, stub->priv->g);
      break;

    case PROP_AY:
      g_value_set_variant (value, stub->priv->ay);
      break;

    case PROP_AS:
      g_value_set_boxed (value, stub->priv->as);
      break;

    case PROP_AO:
      g_value_set_variant (value, stub->priv->ao);
      break;

    case PROP_AG:
      g_value_set_variant (value, stub->priv->ag);
      break;

    case PROP_FINALLY_NORMAL_NAME:
      g_value_set_string (value, stub->priv->finally_normal_name);
      break;

    case PROP_READONLY_PROPERTY:
      g_value_set_string (value, stub->priv->readonly_property);
      break;

    case PROP_WRITEONLY_PROPERTY:
      g_value_set_string (value, stub->priv->writeonly_property);
      break;

    case PROP_UNSET_I:
      g_value_set_int (value, stub->priv->unset_i);
      break;

    case PROP_UNSET_D:
      g_value_set_double (value, stub->priv->unset_d);
      break;

    case PROP_UNSET_S:
      g_value_set_string (value, stub->priv->unset_s);
      break;

    case PROP_UNSET_O:
      g_value_set_string (value, stub->priv->unset_o);
      break;

    case PROP_UNSET_G:
      g_value_set_string (value, stub->priv->unset_g);
      break;

    case PROP_UNSET_AY:
      g_value_set_variant (value, stub->priv->unset_ay);
      break;

    case PROP_UNSET_AS:
      g_value_set_boxed (value, stub->priv->unset_as);
      break;

    case PROP_UNSET_AO:
      g_value_set_variant (value, stub->priv->unset_ao);
      break;

    case PROP_UNSET_AG:
      g_value_set_variant (value, stub->priv->unset_ag);
      break;

    case PROP_UNSET_STRUCT:
      g_value_set_variant (value, stub->priv->unset_struct);
      break;


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

static void
foo_bar_stub_set_property (GObject      *object,
                      guint         prop_id,
                      const GValue *value,
                      GParamSpec   *pspec)
{
  G_GNUC_UNUSED FooBarStub *stub = (FooBarStub *) object;
  switch (prop_id)
    {
    case PROP_Y:
      stub->priv->y = g_value_get_uchar (value);
      break;

    case PROP_B:
      stub->priv->b = g_value_get_boolean (value);
      break;

    case PROP_N:
      stub->priv->n = g_value_get_int (value);
      break;

    case PROP_Q:
      stub->priv->q = g_value_get_uint (value);
      break;

    case PROP_I:
      stub->priv->i = g_value_get_int (value);
      break;

    case PROP_U:
      stub->priv->u = g_value_get_uint (value);
      break;

    case PROP_X:
      stub->priv->x = g_value_get_int64 (value);
      break;

    case PROP_T:
      stub->priv->t = g_value_get_uint64 (value);
      break;

    case PROP_D:
      stub->priv->d = g_value_get_double (value);
      break;

    case PROP_S:
      g_free (stub->priv->s);
      stub->priv->s = g_value_dup_string (value);
      break;

    case PROP_O:
      g_free (stub->priv->o);
      stub->priv->o = g_value_dup_string (value);
      break;

    case PROP_G:
      g_free (stub->priv->g);
      stub->priv->g = g_value_dup_string (value);
      break;

    case PROP_AY:
      if (stub->priv->ay != NULL)
        g_variant_unref (stub->priv->ay);
      stub->priv->ay = g_value_dup_variant (value);
      break;

    case PROP_AS:
      g_strfreev (stub->priv->as);
      stub->priv->as = g_value_dup_boxed (value);
      break;

    case PROP_AO:
      if (stub->priv->ao != NULL)
        g_variant_unref (stub->priv->ao);
      stub->priv->ao = g_value_dup_variant (value);
      break;

    case PROP_AG:
      if (stub->priv->ag != NULL)
        g_variant_unref (stub->priv->ag);
      stub->priv->ag = g_value_dup_variant (value);
      break;

    case PROP_FINALLY_NORMAL_NAME:
      g_free (stub->priv->finally_normal_name);
      stub->priv->finally_normal_name = g_value_dup_string (value);
      break;

    case PROP_READONLY_PROPERTY:
      g_free (stub->priv->readonly_property);
      stub->priv->readonly_property = g_value_dup_string (value);
      break;

    case PROP_WRITEONLY_PROPERTY:
      g_free (stub->priv->writeonly_property);
      stub->priv->writeonly_property = g_value_dup_string (value);
      break;

    case PROP_UNSET_I:
      stub->priv->unset_i = g_value_get_int (value);
      break;

    case PROP_UNSET_D:
      stub->priv->unset_d = g_value_get_double (value);
      break;

    case PROP_UNSET_S:
      g_free (stub->priv->unset_s);
      stub->priv->unset_s = g_value_dup_string (value);
      break;

    case PROP_UNSET_O:
      g_free (stub->priv->unset_o);
      stub->priv->unset_o = g_value_dup_string (value);
      break;

    case PROP_UNSET_G:
      g_free (stub->priv->unset_g);
      stub->priv->unset_g = g_value_dup_string (value);
      break;

    case PROP_UNSET_AY:
      if (stub->priv->unset_ay != NULL)
        g_variant_unref (stub->priv->unset_ay);
      stub->priv->unset_ay = g_value_dup_variant (value);
      break;

    case PROP_UNSET_AS:
      g_strfreev (stub->priv->unset_as);
      stub->priv->unset_as = g_value_dup_boxed (value);
      break;

    case PROP_UNSET_AO:
      if (stub->priv->unset_ao != NULL)
        g_variant_unref (stub->priv->unset_ao);
      stub->priv->unset_ao = g_value_dup_variant (value);
      break;

    case PROP_UNSET_AG:
      if (stub->priv->unset_ag != NULL)
        g_variant_unref (stub->priv->unset_ag);
      stub->priv->unset_ag = g_value_dup_variant (value);
      break;

    case PROP_UNSET_STRUCT:
      if (stub->priv->unset_struct != NULL)
        g_variant_unref (stub->priv->unset_struct);
      stub->priv->unset_struct = g_value_dup_variant (value);
      break;


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

static void
foo_bar_stub_init (FooBarStub *stub)
{
  stub->priv = G_TYPE_INSTANCE_GET_PRIVATE (stub, FOO_TYPE_BAR_STUB, FooBarStubPrivate);
}

static void
foo_bar_stub_class_init (FooBarStubClass *klass)
{
  GObjectClass *gobject_class;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->finalize     = foo_bar_stub_finalize;
  gobject_class->get_property = foo_bar_stub_get_property;
  gobject_class->set_property = foo_bar_stub_set_property;

  foo_bar_override_properties (gobject_class, 1);
  g_type_class_add_private (klass, sizeof (FooBarStubPrivate));
}

static void
stub_iface_init (FooBarIface *iface)
{
}

/**
 * foo_bar_stub_new:
 *
 * Creates a new stub object that can be exported via foo_bar_register_object().
 *
 * Returns: A #FooBarStub instance. Free with g_object_unref().
 */
FooBar *
foo_bar_stub_new (void)
{
  return FOO_BAR (g_object_new (FOO_TYPE_BAR_STUB, NULL));
}
