--- /dev/null
+/* dbus_type_mismatch_client.c generated by valac, the Vala compiler
+ * generated from dbus_type_mismatch_client.vala, do not modify */
+
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <glib.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !defined(VALA_STRICT_C)
+#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
+#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
+#elif defined(__clang__) && (__clang_major__ >= 16)
+#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
+#endif
+#endif
+#if !defined(VALA_EXTERN)
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+#define TYPE_TEST (test_get_type ())
+#define TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST, Test))
+#define IS_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST))
+#define TEST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_TEST, TestIface))
+
+typedef struct _Test Test;
+typedef struct _TestIface TestIface;
+
+#define TYPE_TEST_PROXY (test_proxy_get_type ())
+enum {
+ TEST_TEST_SIGNAL_SIGNAL,
+ TEST_NUM_SIGNALS
+};
+static guint test_signals[TEST_NUM_SIGNALS] = {0};
+typedef GDBusProxy TestProxy;
+typedef GDBusProxyClass TestProxyClass;
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _TestOutMismatchReadyData TestOutMismatchReadyData;
+#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
+#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
+typedef struct _TestInMismatchReadyData TestInMismatchReadyData;
+typedef struct _TestOutMismatchNothrowReadyData TestOutMismatchNothrowReadyData;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+typedef struct _ValaMainAsyncData ValaMainAsyncData;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _TestIface {
+ GTypeInterface parent_iface;
+ void (*out_mismatch) (Test* self, gint a, GHashTable* b, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ gchar* (*out_mismatch_finish) (Test* self, GAsyncResult* _res_, GVariant** c, GError** error);
+ void (*in_mismatch) (Test* self, gint a, GHashTable* b, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ gchar* (*in_mismatch_finish) (Test* self, GAsyncResult* _res_, GVariant** c, GError** error);
+ void (*out_mismatch_nothrow) (Test* self, gint a, GHashTable* b, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ gchar* (*out_mismatch_nothrow_finish) (Test* self, GAsyncResult* _res_, GVariant** c);
+ gchar* (*get_test_property) (Test* self);
+ void (*set_test_property) (Test* self, const gchar* value);
+};
+
+struct _TestOutMismatchReadyData {
+ GDBusMethodInvocation* _invocation_;
+ gint a;
+ GHashTable* b;
+};
+
+struct _TestInMismatchReadyData {
+ GDBusMethodInvocation* _invocation_;
+ gint a;
+ GHashTable* b;
+};
+
+struct _TestOutMismatchNothrowReadyData {
+ GDBusMethodInvocation* _invocation_;
+ gint a;
+ GHashTable* b;
+};
+
+struct _ValaMainAsyncData {
+ int _state_;
+ GObject* _source_object_;
+ GAsyncResult* _res_;
+ GTask* _async_result;
+ Test* test;
+ Test* _tmp0_;
+ gchar* s;
+ Test* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ const gchar* _tmp4_;
+ Test* _tmp5_;
+ GHashTable* b;
+ GHashTable* _tmp6_;
+ GVariant* c;
+ gboolean caught_error;
+ gchar* _tmp7_;
+ Test* _tmp8_;
+ GHashTable* _tmp9_;
+ GVariant* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ Test* _tmp14_;
+ GHashTable* _tmp15_;
+ GVariant* _tmp16_;
+ gchar* _tmp17_;
+ gchar* _tmp18_;
+ Test* _tmp19_;
+ GHashTable* _tmp20_;
+ GVariant* _tmp21_;
+ gchar* _tmp22_;
+ const gchar* _tmp23_;
+ GError* _inner_error0_;
+};
+
+VALA_EXTERN GType test_proxy_get_type (void) G_GNUC_CONST ;
+VALA_EXTERN guint test_register_object (void* object,
+ GDBusConnection* connection,
+ const gchar* path,
+ GError** error);
+VALA_EXTERN GType test_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (Test, g_object_unref)
+VALA_EXTERN void test_out_mismatch (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+VALA_EXTERN gchar* test_out_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error);
+VALA_EXTERN void test_in_mismatch (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+VALA_EXTERN gchar* test_in_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error);
+VALA_EXTERN void test_out_mismatch_nothrow (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+VALA_EXTERN gchar* test_out_mismatch_nothrow_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c);
+VALA_EXTERN gchar* test_get_test_property (Test* self);
+VALA_EXTERN void test_set_test_property (Test* self,
+ const gchar* value);
+static void g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure,
+ GValue * return_value,
+ guint n_param_values,
+ const GValue * param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+static GType test_get_type_once (void);
+static void test_proxy_g_signal (GDBusProxy* proxy,
+ const gchar* sender_name,
+ const gchar* signal_name,
+ GVariant* parameters);
+static void _dbus_handle_test_test_signal (Test* self,
+ GVariant* parameters);
+static void test_proxy_out_mismatch_async (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+static gchar* test_proxy_out_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error);
+static void test_proxy_in_mismatch_async (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+static gchar* test_proxy_in_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error);
+static void test_proxy_out_mismatch_nothrow_async (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+static gchar* test_proxy_out_mismatch_nothrow_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c);
+static gchar* test_dbus_proxy_get_test_property (Test* self);
+static void test_dbus_proxy_set_test_property (Test* self,
+ const gchar* value);
+static void test_proxy_test_interface_init (TestIface* iface);
+static void _dbus_test_out_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation);
+static void _dbus_test_out_mismatch_ready (GObject * source_object,
+ GAsyncResult * _res_,
+ gpointer _user_data_);
+static void _dbus_test_in_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation);
+static void _dbus_test_in_mismatch_ready (GObject * source_object,
+ GAsyncResult * _res_,
+ gpointer _user_data_);
+static void _dbus_test_out_mismatch_nothrow (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation);
+static void _dbus_test_out_mismatch_nothrow_ready (GObject * source_object,
+ GAsyncResult * _res_,
+ gpointer _user_data_);
+static void test_dbus_interface_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);
+static GVariant* test_dbus_interface_get_property (GDBusConnection* connection,
+ const gchar* sender,
+ const gchar* object_path,
+ const gchar* interface_name,
+ const gchar* property_name,
+ GError** error,
+ gpointer user_data);
+static GVariant* _dbus_test_get_test_property (Test* self);
+static gboolean test_dbus_interface_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);
+static void _dbus_test_set_test_property (Test* self,
+ GVariant* _value);
+static void _dbus_test_test_signal (GObject* _sender,
+ gint a,
+ const gchar* b,
+ gpointer* _data);
+static void _test_unregister_object (gpointer user_data);
+static void _vala_main_async_data_free (gpointer _data);
+static void _vala_main_async (GAsyncReadyCallback _callback_,
+ gpointer _user_data_);
+static void _vala_main_finish (GAsyncResult* _res_);
+static gboolean _vala_main_async_co (ValaMainAsyncData* _data_);
+static void _vala_lambda0_ (void);
+static void __vala_lambda0__test_test_signal (Test* _sender,
+ gint a,
+ const gchar* b,
+ gpointer self);
+static void _g_free0_ (gpointer var);
+static void _vala_main_async_ready (GObject* source_object,
+ GAsyncResult* _res_,
+ gpointer _user_data_);
+
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_a = {-1, "a", "i", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_b = {-1, "b", "a{si}", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_c = {-1, "c", "v", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_result = {-1, "result", "s", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_in[] = {&_test_dbus_arg_info_out_mismatch_a, &_test_dbus_arg_info_out_mismatch_b, NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_out[] = {&_test_dbus_arg_info_out_mismatch_c, &_test_dbus_arg_info_out_mismatch_result, NULL};
+static const GDBusMethodInfo _test_dbus_method_info_out_mismatch = {-1, "OutMismatch", (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_in), (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_out), NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_a = {-1, "a", "i", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_b = {-1, "b", "a{si}", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_c = {-1, "c", "v", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_result = {-1, "result", "s", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_in_mismatch_in[] = {&_test_dbus_arg_info_in_mismatch_a, &_test_dbus_arg_info_in_mismatch_b, NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_in_mismatch_out[] = {&_test_dbus_arg_info_in_mismatch_c, &_test_dbus_arg_info_in_mismatch_result, NULL};
+static const GDBusMethodInfo _test_dbus_method_info_in_mismatch = {-1, "InMismatch", (GDBusArgInfo **) (&_test_dbus_arg_info_in_mismatch_in), (GDBusArgInfo **) (&_test_dbus_arg_info_in_mismatch_out), NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_a = {-1, "a", "i", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_b = {-1, "b", "a{si}", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_c = {-1, "c", "v", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_result = {-1, "result", "s", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_nothrow_in[] = {&_test_dbus_arg_info_out_mismatch_nothrow_a, &_test_dbus_arg_info_out_mismatch_nothrow_b, NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_nothrow_out[] = {&_test_dbus_arg_info_out_mismatch_nothrow_c, &_test_dbus_arg_info_out_mismatch_nothrow_result, NULL};
+static const GDBusMethodInfo _test_dbus_method_info_out_mismatch_nothrow = {-1, "OutMismatchNothrow", (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_nothrow_in), (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_nothrow_out), NULL};
+static const GDBusMethodInfo * const _test_dbus_method_info[] = {&_test_dbus_method_info_out_mismatch, &_test_dbus_method_info_in_mismatch, &_test_dbus_method_info_out_mismatch_nothrow, NULL};
+static const GDBusArgInfo _test_dbus_arg_info_test_signal_a = {-1, "a", "i", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_test_signal_b = {-1, "b", "s", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_test_signal[] = {&_test_dbus_arg_info_test_signal_a, &_test_dbus_arg_info_test_signal_b, NULL};
+static const GDBusSignalInfo _test_dbus_signal_info_test_signal = {-1, "TestSignal", (GDBusArgInfo **) (&_test_dbus_arg_info_test_signal), NULL};
+static const GDBusSignalInfo * const _test_dbus_signal_info[] = {&_test_dbus_signal_info_test_signal, NULL};
+static const GDBusPropertyInfo _test_dbus_property_info_test_property = {-1, "TestProperty", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
+static const GDBusPropertyInfo * const _test_dbus_property_info[] = {&_test_dbus_property_info_test_property, NULL};
+static const GDBusInterfaceInfo _test_dbus_interface_info = {-1, "org.example.Test", (GDBusMethodInfo **) (&_test_dbus_method_info), (GDBusSignalInfo **) (&_test_dbus_signal_info), (GDBusPropertyInfo **) (&_test_dbus_property_info), NULL};
+static const GDBusInterfaceVTable _test_dbus_interface_vtable = {test_dbus_interface_method_call, test_dbus_interface_get_property, test_dbus_interface_set_property};
+
+void
+test_out_mismatch (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ TestIface* _iface_;
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->out_mismatch) {
+ _iface_->out_mismatch (self, a, b, _callback_, _user_data_);
+ }
+}
+
+gchar*
+test_out_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error)
+{
+ TestIface* _iface_;
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->out_mismatch_finish) {
+ return _iface_->out_mismatch_finish (self, _res_, c, error);
+ }
+ return NULL;
+}
+
+void
+test_in_mismatch (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ TestIface* _iface_;
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->in_mismatch) {
+ _iface_->in_mismatch (self, a, b, _callback_, _user_data_);
+ }
+}
+
+gchar*
+test_in_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error)
+{
+ TestIface* _iface_;
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->in_mismatch_finish) {
+ return _iface_->in_mismatch_finish (self, _res_, c, error);
+ }
+ return NULL;
+}
+
+void
+test_out_mismatch_nothrow (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ TestIface* _iface_;
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->out_mismatch_nothrow) {
+ _iface_->out_mismatch_nothrow (self, a, b, _callback_, _user_data_);
+ }
+}
+
+gchar*
+test_out_mismatch_nothrow_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c)
+{
+ TestIface* _iface_;
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->out_mismatch_nothrow_finish) {
+ return _iface_->out_mismatch_nothrow_finish (self, _res_, c);
+ }
+ return NULL;
+}
+
+gchar*
+test_get_test_property (Test* self)
+{
+ TestIface* _iface_;
+ g_return_val_if_fail (IS_TEST (self), NULL);
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->get_test_property) {
+ return _iface_->get_test_property (self);
+ }
+ return NULL;
+}
+
+void
+test_set_test_property (Test* self,
+ const gchar* value)
+{
+ TestIface* _iface_;
+ g_return_if_fail (IS_TEST (self));
+ _iface_ = TEST_GET_INTERFACE (self);
+ if (_iface_->set_test_property) {
+ _iface_->set_test_property (self, value);
+ }
+}
+
+static void
+g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure,
+ GValue * return_value,
+ guint n_param_values,
+ const GValue * param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer data1, gint arg_1, const char* arg_2, gpointer data2);
+ register GMarshalFunc_VOID__INT_STRING callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+ g_return_if_fail (n_param_values == 3);
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+ data1 = closure->data;
+ data2 = param_values->data[0].v_pointer;
+ } else {
+ data1 = param_values->data[0].v_pointer;
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
+ callback (data1, g_value_get_int (param_values + 1), g_value_get_string (param_values + 2), data2);
+}
+
+static void
+test_default_init (TestIface * iface,
+ gpointer iface_data)
+{
+ test_signals[TEST_TEST_SIGNAL_SIGNAL] = g_signal_new ("test-signal", TYPE_TEST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING);
+}
+
+static GType
+test_get_type_once (void)
+{
+ static const GTypeInfo g_define_type_info = { sizeof (TestIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
+ GType test_type_id;
+ test_type_id = g_type_register_static (G_TYPE_INTERFACE, "Test", &g_define_type_info, 0);
+ g_type_interface_add_prerequisite (test_type_id, G_TYPE_OBJECT);
+ g_type_set_qdata (test_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) test_proxy_get_type);
+ g_type_set_qdata (test_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.example.Test");
+ g_type_set_qdata (test_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_test_dbus_interface_info));
+ g_type_set_qdata (test_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) test_register_object);
+ return test_type_id;
+}
+
+GType
+test_get_type (void)
+{
+ static volatile gsize test_type_id__once = 0;
+ if (g_once_init_enter (&test_type_id__once)) {
+ GType test_type_id;
+ test_type_id = test_get_type_once ();
+ g_once_init_leave (&test_type_id__once, test_type_id);
+ }
+ return test_type_id__once;
+}
+
+G_DEFINE_TYPE_EXTENDED (TestProxy, test_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_TEST, test_proxy_test_interface_init) )
+static void
+test_proxy_class_init (TestProxyClass* klass)
+{
+ G_DBUS_PROXY_CLASS (klass)->g_signal = test_proxy_g_signal;
+}
+
+static void
+_dbus_handle_test_test_signal (Test* self,
+ GVariant* parameters)
+{
+ GVariantIter _arguments_iter;
+ gint a = 0;
+ GVariant* _tmp0_;
+ gchar* b = NULL;
+ GVariant* _tmp1_;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ _tmp0_ = g_variant_iter_next_value (&_arguments_iter);
+ a = g_variant_get_int32 (_tmp0_);
+ g_variant_unref (_tmp0_);
+ _tmp1_ = g_variant_iter_next_value (&_arguments_iter);
+ b = g_variant_dup_string (_tmp1_, NULL);
+ g_variant_unref (_tmp1_);
+ g_signal_emit_by_name (self, "test-signal", a, b);
+ _g_free0 (b);
+}
+
+static void
+test_proxy_g_signal (GDBusProxy* proxy,
+ const gchar* sender_name,
+ const gchar* signal_name,
+ GVariant* parameters)
+{
+ if (strcmp (signal_name, "TestSignal") == 0) {
+ _dbus_handle_test_test_signal ((Test*) proxy, parameters);
+ }
+}
+
+static void
+test_proxy_init (TestProxy* self)
+{
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_test_dbus_interface_info));
+}
+
+static void
+test_proxy_out_mismatch_async (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ GVariantBuilder _arguments_builder;
+ GVariantBuilder _tmp2_;
+ GHashTableIter _tmp3_;
+ gpointer _tmp4_;
+ gpointer _tmp5_;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (a));
+ g_hash_table_iter_init (&_tmp3_, b);
+ g_variant_builder_init (&_tmp2_, G_VARIANT_TYPE ("a{si}"));
+ while (g_hash_table_iter_next (&_tmp3_, &_tmp4_, &_tmp5_)) {
+ gchar* _key;
+ gint _value;
+ _key = (gchar*) _tmp4_;
+ _value = (gint) ((gintptr) _tmp5_);
+ g_variant_builder_add (&_tmp2_, "{?*}", g_variant_new_string (_key), g_variant_new_int32 (_value));
+ }
+ g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp2_));
+ g_dbus_proxy_call ((GDBusProxy *) self, "OutMismatch", g_variant_builder_end (&_arguments_builder), G_DBUS_CALL_FLAGS_NONE, -1, NULL, _callback_, _user_data_);
+}
+
+static gchar*
+test_proxy_out_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error)
+{
+ GVariant *_reply;
+ GVariantIter _reply_iter;
+ GVariant* _vala_c = NULL;
+ GVariant* _tmp6_;
+ gchar* _result = NULL;
+ GVariant* _tmp7_;
+ _reply = g_dbus_proxy_call_finish ((GDBusProxy *) self, _res_, error);
+ if (!_reply) {
+ return NULL;
+ }
+ g_variant_iter_init (&_reply_iter, _reply);
+ _tmp6_ = g_variant_iter_next_value (&_reply_iter);
+ _vala_c = g_variant_get_variant (_tmp6_);
+ g_variant_unref (_tmp6_);
+ *c = _vala_c;
+ _tmp7_ = g_variant_iter_next_value (&_reply_iter);
+ _result = g_variant_dup_string (_tmp7_, NULL);
+ g_variant_unref (_tmp7_);
+ g_variant_unref (_reply);
+ return _result;
+}
+
+static void
+test_proxy_in_mismatch_async (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ GVariantBuilder _arguments_builder;
+ GVariantBuilder _tmp8_;
+ GHashTableIter _tmp9_;
+ gpointer _tmp10_;
+ gpointer _tmp11_;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (a));
+ g_hash_table_iter_init (&_tmp9_, b);
+ g_variant_builder_init (&_tmp8_, G_VARIANT_TYPE ("a{si}"));
+ while (g_hash_table_iter_next (&_tmp9_, &_tmp10_, &_tmp11_)) {
+ gchar* _key;
+ gint _value;
+ _key = (gchar*) _tmp10_;
+ _value = (gint) ((gintptr) _tmp11_);
+ g_variant_builder_add (&_tmp8_, "{?*}", g_variant_new_string (_key), g_variant_new_int32 (_value));
+ }
+ g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp8_));
+ g_dbus_proxy_call ((GDBusProxy *) self, "InMismatch", g_variant_builder_end (&_arguments_builder), G_DBUS_CALL_FLAGS_NONE, -1, NULL, _callback_, _user_data_);
+}
+
+static gchar*
+test_proxy_in_mismatch_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c,
+ GError** error)
+{
+ GVariant *_reply;
+ GVariantIter _reply_iter;
+ GVariant* _vala_c = NULL;
+ GVariant* _tmp12_;
+ gchar* _result = NULL;
+ GVariant* _tmp13_;
+ _reply = g_dbus_proxy_call_finish ((GDBusProxy *) self, _res_, error);
+ if (!_reply) {
+ return NULL;
+ }
+ g_variant_iter_init (&_reply_iter, _reply);
+ _tmp12_ = g_variant_iter_next_value (&_reply_iter);
+ _vala_c = g_variant_get_variant (_tmp12_);
+ g_variant_unref (_tmp12_);
+ *c = _vala_c;
+ _tmp13_ = g_variant_iter_next_value (&_reply_iter);
+ _result = g_variant_dup_string (_tmp13_, NULL);
+ g_variant_unref (_tmp13_);
+ g_variant_unref (_reply);
+ return _result;
+}
+
+static void
+test_proxy_out_mismatch_nothrow_async (Test* self,
+ gint a,
+ GHashTable* b,
+ GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ GVariantBuilder _arguments_builder;
+ GVariantBuilder _tmp14_;
+ GHashTableIter _tmp15_;
+ gpointer _tmp16_;
+ gpointer _tmp17_;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (a));
+ g_hash_table_iter_init (&_tmp15_, b);
+ g_variant_builder_init (&_tmp14_, G_VARIANT_TYPE ("a{si}"));
+ while (g_hash_table_iter_next (&_tmp15_, &_tmp16_, &_tmp17_)) {
+ gchar* _key;
+ gint _value;
+ _key = (gchar*) _tmp16_;
+ _value = (gint) ((gintptr) _tmp17_);
+ g_variant_builder_add (&_tmp14_, "{?*}", g_variant_new_string (_key), g_variant_new_int32 (_value));
+ }
+ g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp14_));
+ g_dbus_proxy_call ((GDBusProxy *) self, "OutMismatchNothrow", g_variant_builder_end (&_arguments_builder), G_DBUS_CALL_FLAGS_NONE, -1, NULL, _callback_, _user_data_);
+}
+
+static gchar*
+test_proxy_out_mismatch_nothrow_finish (Test* self,
+ GAsyncResult* _res_,
+ GVariant** c)
+{
+ GVariant *_reply;
+ GVariantIter _reply_iter;
+ GVariant* _vala_c = NULL;
+ GVariant* _tmp18_;
+ gchar* _result = NULL;
+ GVariant* _tmp19_;
+ _reply = g_dbus_proxy_call_finish ((GDBusProxy *) self, _res_, NULL);
+ if (!_reply) {
+ return NULL;
+ }
+ g_variant_iter_init (&_reply_iter, _reply);
+ _tmp18_ = g_variant_iter_next_value (&_reply_iter);
+ _vala_c = g_variant_get_variant (_tmp18_);
+ g_variant_unref (_tmp18_);
+ *c = _vala_c;
+ _tmp19_ = g_variant_iter_next_value (&_reply_iter);
+ _result = g_variant_dup_string (_tmp19_, NULL);
+ g_variant_unref (_tmp19_);
+ g_variant_unref (_reply);
+ return _result;
+}
+
+static gchar*
+test_dbus_proxy_get_test_property (Test* self)
+{
+ GVariant *_inner_reply;
+ gchar* _result;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "TestProperty");
+ if (!_inner_reply) {
+ GVariant *_arguments;
+ GVariant *_reply;
+ GVariantBuilder _arguments_builder;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.example.Test"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("TestProperty"));
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return NULL;
+ }
+ if (G_UNLIKELY (!g_variant_is_of_type (_reply, G_VARIANT_TYPE ("(v)")))) {
+ g_variant_unref (_reply);
+ return NULL;
+ }
+ g_variant_get (_reply, "(v)", &_inner_reply);
+ g_variant_unref (_reply);
+ }
+ if (G_UNLIKELY (!g_variant_is_of_type (_inner_reply, G_VARIANT_TYPE ("s")))) {
+ g_warning ("Expected property %s.%s to be of type '%s', but received '%s'", "org.example.Test", "TestProperty", "s", g_variant_get_type_string (_inner_reply));
+ g_variant_unref (_inner_reply);
+ return NULL;
+ }
+ _result = g_variant_dup_string (_inner_reply, NULL);
+ g_variant_unref (_inner_reply);
+ return _result;
+}
+
+static void
+test_dbus_proxy_set_test_property (Test* self,
+ const gchar* value)
+{
+ GVariant *_arguments;
+ GVariant *_reply;
+ GVariantBuilder _arguments_builder;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.example.Test"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("TestProperty"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+static void
+test_proxy_test_interface_init (TestIface* iface)
+{
+ iface->out_mismatch = test_proxy_out_mismatch_async;
+ iface->out_mismatch_finish = test_proxy_out_mismatch_finish;
+ iface->in_mismatch = test_proxy_in_mismatch_async;
+ iface->in_mismatch_finish = test_proxy_in_mismatch_finish;
+ iface->out_mismatch_nothrow = test_proxy_out_mismatch_nothrow_async;
+ iface->out_mismatch_nothrow_finish = test_proxy_out_mismatch_nothrow_finish;
+ iface->get_test_property = test_dbus_proxy_get_test_property;
+ iface->set_test_property = test_dbus_proxy_set_test_property;
+}
+
+static void
+_dbus_test_out_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation)
+{
+ GVariantIter _arguments_iter;
+ TestOutMismatchReadyData* _ready_data;
+ GVariant* _tmp20_;
+ GVariant* _tmp21_;
+ GHashTable* _tmp22_;
+ GVariantIter _tmp23_;
+ GVariant* _tmp24_;
+ GVariant* _tmp25_;
+ g_variant_iter_init (&_arguments_iter, _parameters_);
+ _ready_data = g_slice_new0 (TestOutMismatchReadyData);
+ _ready_data->_invocation_ = invocation;
+ _tmp20_ = g_variant_iter_next_value (&_arguments_iter);
+ _ready_data->a = g_variant_get_int32 (_tmp20_);
+ g_variant_unref (_tmp20_);
+ _tmp21_ = g_variant_iter_next_value (&_arguments_iter);
+ _tmp22_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp23_, _tmp21_);
+ while (g_variant_iter_loop (&_tmp23_, "{?*}", &_tmp24_, &_tmp25_)) {
+ g_hash_table_insert (_tmp22_, g_variant_dup_string (_tmp24_, NULL), (gpointer) ((gintptr) g_variant_get_int32 (_tmp25_)));
+ }
+ _ready_data->b = _tmp22_;
+ g_variant_unref (_tmp21_);
+ test_out_mismatch (self, _ready_data->a, _ready_data->b, (GAsyncReadyCallback) _dbus_test_out_mismatch_ready, _ready_data);
+ _error:
+ ;
+}
+
+static void
+_dbus_test_out_mismatch_ready (GObject * source_object,
+ GAsyncResult * _res_,
+ gpointer _user_data_)
+{
+ TestOutMismatchReadyData* _ready_data;
+ GDBusMethodInvocation* invocation;
+ GError* error = NULL;
+ GDBusMessage* _reply_message = NULL;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ GVariant* c = NULL;
+ gchar* result;
+ _ready_data = _user_data_;
+ invocation = _ready_data->_invocation_;
+ result = test_out_mismatch_finish ((Test*) source_object, _res_, &c, &error);
+ if (error) {
+ g_dbus_method_invocation_take_error (invocation, error);
+ goto _error;
+ }
+ _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
+ g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (c));
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
+ _g_free0 (result);
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
+ g_object_unref (invocation);
+ g_object_unref (_reply_message);
+ _error:
+ _g_hash_table_unref0 (_ready_data->b);
+ _g_variant_unref0 (c);
+ g_slice_free (TestOutMismatchReadyData, _ready_data);
+}
+
+static void
+_dbus_test_in_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation)
+{
+ GVariantIter _arguments_iter;
+ TestInMismatchReadyData* _ready_data;
+ GVariant* _tmp26_;
+ GVariant* _tmp27_;
+ GHashTable* _tmp28_;
+ GVariantIter _tmp29_;
+ GVariant* _tmp30_;
+ GVariant* _tmp31_;
+ g_variant_iter_init (&_arguments_iter, _parameters_);
+ _ready_data = g_slice_new0 (TestInMismatchReadyData);
+ _ready_data->_invocation_ = invocation;
+ _tmp26_ = g_variant_iter_next_value (&_arguments_iter);
+ _ready_data->a = g_variant_get_int32 (_tmp26_);
+ g_variant_unref (_tmp26_);
+ _tmp27_ = g_variant_iter_next_value (&_arguments_iter);
+ _tmp28_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp29_, _tmp27_);
+ while (g_variant_iter_loop (&_tmp29_, "{?*}", &_tmp30_, &_tmp31_)) {
+ g_hash_table_insert (_tmp28_, g_variant_dup_string (_tmp30_, NULL), (gpointer) ((gintptr) g_variant_get_int32 (_tmp31_)));
+ }
+ _ready_data->b = _tmp28_;
+ g_variant_unref (_tmp27_);
+ test_in_mismatch (self, _ready_data->a, _ready_data->b, (GAsyncReadyCallback) _dbus_test_in_mismatch_ready, _ready_data);
+ _error:
+ ;
+}
+
+static void
+_dbus_test_in_mismatch_ready (GObject * source_object,
+ GAsyncResult * _res_,
+ gpointer _user_data_)
+{
+ TestInMismatchReadyData* _ready_data;
+ GDBusMethodInvocation* invocation;
+ GError* error = NULL;
+ GDBusMessage* _reply_message = NULL;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ GVariant* c = NULL;
+ gchar* result;
+ _ready_data = _user_data_;
+ invocation = _ready_data->_invocation_;
+ result = test_in_mismatch_finish ((Test*) source_object, _res_, &c, &error);
+ if (error) {
+ g_dbus_method_invocation_take_error (invocation, error);
+ goto _error;
+ }
+ _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
+ g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (c));
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
+ _g_free0 (result);
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
+ g_object_unref (invocation);
+ g_object_unref (_reply_message);
+ _error:
+ _g_hash_table_unref0 (_ready_data->b);
+ _g_variant_unref0 (c);
+ g_slice_free (TestInMismatchReadyData, _ready_data);
+}
+
+static void
+_dbus_test_out_mismatch_nothrow (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation)
+{
+ GVariantIter _arguments_iter;
+ TestOutMismatchNothrowReadyData* _ready_data;
+ GVariant* _tmp32_;
+ GVariant* _tmp33_;
+ GHashTable* _tmp34_;
+ GVariantIter _tmp35_;
+ GVariant* _tmp36_;
+ GVariant* _tmp37_;
+ g_variant_iter_init (&_arguments_iter, _parameters_);
+ _ready_data = g_slice_new0 (TestOutMismatchNothrowReadyData);
+ _ready_data->_invocation_ = invocation;
+ _tmp32_ = g_variant_iter_next_value (&_arguments_iter);
+ _ready_data->a = g_variant_get_int32 (_tmp32_);
+ g_variant_unref (_tmp32_);
+ _tmp33_ = g_variant_iter_next_value (&_arguments_iter);
+ _tmp34_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp35_, _tmp33_);
+ while (g_variant_iter_loop (&_tmp35_, "{?*}", &_tmp36_, &_tmp37_)) {
+ g_hash_table_insert (_tmp34_, g_variant_dup_string (_tmp36_, NULL), (gpointer) ((gintptr) g_variant_get_int32 (_tmp37_)));
+ }
+ _ready_data->b = _tmp34_;
+ g_variant_unref (_tmp33_);
+ test_out_mismatch_nothrow (self, _ready_data->a, _ready_data->b, (GAsyncReadyCallback) _dbus_test_out_mismatch_nothrow_ready, _ready_data);
+}
+
+static void
+_dbus_test_out_mismatch_nothrow_ready (GObject * source_object,
+ GAsyncResult * _res_,
+ gpointer _user_data_)
+{
+ TestOutMismatchNothrowReadyData* _ready_data;
+ GDBusMethodInvocation* invocation;
+ GError* error = NULL;
+ GDBusMessage* _reply_message = NULL;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ GVariant* c = NULL;
+ gchar* result;
+ _ready_data = _user_data_;
+ invocation = _ready_data->_invocation_;
+ result = test_out_mismatch_nothrow_finish ((Test*) source_object, _res_, &c);
+ _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
+ g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (c));
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
+ _g_free0 (result);
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
+ g_object_unref (invocation);
+ g_object_unref (_reply_message);
+ _error:
+ _g_hash_table_unref0 (_ready_data->b);
+ _g_variant_unref0 (c);
+ g_slice_free (TestOutMismatchNothrowReadyData, _ready_data);
+}
+
+static void
+test_dbus_interface_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)
+{
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (method_name, "OutMismatch") == 0) {
+ _dbus_test_out_mismatch (object, parameters, invocation);
+ } else if (strcmp (method_name, "InMismatch") == 0) {
+ _dbus_test_in_mismatch (object, parameters, invocation);
+ } else if (strcmp (method_name, "OutMismatchNothrow") == 0) {
+ _dbus_test_out_mismatch_nothrow (object, parameters, invocation);
+ } else {
+ g_object_unref (invocation);
+ }
+}
+
+static GVariant*
+_dbus_test_get_test_property (Test* self)
+{
+ gchar* result;
+ GVariant* _reply;
+ result = test_get_test_property (self);
+ _reply = g_variant_new_string (result);
+ _g_free0 (result);
+ return _reply;
+}
+
+static GVariant*
+test_dbus_interface_get_property (GDBusConnection* connection,
+ const gchar* sender,
+ const gchar* object_path,
+ const gchar* interface_name,
+ const gchar* property_name,
+ GError** error,
+ gpointer user_data)
+{
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "TestProperty") == 0) {
+ return _dbus_test_get_test_property (object);
+ }
+ return NULL;
+}
+
+static void
+_dbus_test_set_test_property (Test* self,
+ GVariant* _value)
+{
+ gchar* value = NULL;
+ value = g_variant_dup_string (_value, NULL);
+ test_set_test_property (self, value);
+ _g_free0 (value);
+}
+
+static gboolean
+test_dbus_interface_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)
+{
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "TestProperty") == 0) {
+ _dbus_test_set_test_property (object, value);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+_dbus_test_test_signal (GObject* _sender,
+ gint a,
+ const gchar* b,
+ gpointer* _data)
+{
+ GDBusConnection * _connection;
+ const gchar * _path;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ _connection = _data[1];
+ _path = _data[2];
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (a));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (b));
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ g_dbus_connection_emit_signal (_connection, NULL, _path, "org.example.Test", "TestSignal", _arguments, NULL);
+}
+
+guint
+test_register_object (gpointer object,
+ GDBusConnection* connection,
+ const gchar* path,
+ GError** error)
+{
+ guint result;
+ gpointer *data;
+ data = g_new (gpointer, 3);
+ data[0] = g_object_ref (object);
+ data[1] = g_object_ref (connection);
+ data[2] = g_strdup (path);
+ result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_test_dbus_interface_info), &_test_dbus_interface_vtable, data, _test_unregister_object, error);
+ if (!result) {
+ return 0;
+ }
+ g_signal_connect (object, "test-signal", (GCallback) _dbus_test_test_signal, data);
+ return result;
+}
+
+static void
+_test_unregister_object (gpointer user_data)
+{
+ gpointer* data;
+ data = user_data;
+ g_signal_handlers_disconnect_by_func (data[0], _dbus_test_test_signal, data);
+ g_object_unref (data[0]);
+ g_object_unref (data[1]);
+ g_free (data[2]);
+ g_free (data);
+}
+
+static void
+_vala_main_async_data_free (gpointer _data)
+{
+ ValaMainAsyncData* _data_;
+ _data_ = _data;
+ g_slice_free (ValaMainAsyncData, _data_);
+}
+
+void
+_vala_main_async (GAsyncReadyCallback _callback_,
+ gpointer _user_data_)
+{
+ ValaMainAsyncData* _data_;
+ _data_ = g_slice_new0 (ValaMainAsyncData);
+ _data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
+ g_task_set_source_tag (_data_->_async_result, _vala_main_async);
+ g_task_set_task_data (_data_->_async_result, _data_, _vala_main_async_data_free);
+ _vala_main_async_co (_data_);
+}
+
+void
+_vala_main_finish (GAsyncResult* _res_)
+{
+ ValaMainAsyncData* _data_;
+ g_return_if_fail (G_IS_TASK (_res_));
+ g_return_if_fail (g_async_result_is_tagged (_res_, _vala_main_async));
+ _data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
+}
+
+static void
+_vala_lambda0_ (void)
+{
+ g_assert_not_reached ();
+}
+
+static void
+__vala_lambda0__test_test_signal (Test* _sender,
+ gint a,
+ const gchar* b,
+ gpointer self)
+{
+ _vala_lambda0_ ();
+}
+
+static void
+_g_free0_ (gpointer var)
+{
+ var = (g_free (var), NULL);
+}
+
+static void
+_vala_main_async_ready (GObject* source_object,
+ GAsyncResult* _res_,
+ gpointer _user_data_)
+{
+ ValaMainAsyncData* _data_;
+ _data_ = _user_data_;
+ _data_->_source_object_ = source_object;
+ _data_->_res_ = _res_;
+ _vala_main_async_co (_data_);
+}
+
+static gboolean
+_vala_main_async_co (ValaMainAsyncData* _data_)
+{
+ switch (_data_->_state_) {
+ case 0:
+ goto _state_0;
+ case 1:
+ goto _state_1;
+ case 2:
+ goto _state_2;
+ case 3:
+ goto _state_3;
+ default:
+ g_assert_not_reached ();
+ }
+ _state_0:
+ g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ _data_->_tmp0_ = (Test*) g_initable_new (TYPE_TEST_PROXY, NULL, &_data_->_inner_error0_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", "org.example.Test", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/example/test", "g-interface-name", "org.example.Test", NULL);
+ _data_->test = (Test*) _data_->_tmp0_;
+ if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
+ g_clear_error (&_data_->_inner_error0_);
+ g_object_unref (_data_->_async_result);
+ return FALSE;
+ }
+ _data_->_tmp1_ = _data_->test;
+ _data_->_tmp2_ = test_get_test_property (_data_->_tmp1_);
+ _data_->_tmp3_ = _data_->_tmp2_;
+ _data_->s = _data_->_tmp3_;
+ _data_->_tmp4_ = _data_->s;
+ _vala_assert (_data_->_tmp4_ == NULL, "s == null");
+ _data_->_tmp5_ = _data_->test;
+ g_signal_connect (_data_->_tmp5_, "test-signal", (GCallback) __vala_lambda0__test_test_signal, NULL);
+ _data_->_tmp6_ = g_hash_table_new_full (NULL, NULL, _g_free0_, NULL);
+ _data_->b = _data_->_tmp6_;
+ _data_->caught_error = FALSE;
+ {
+ _data_->_tmp8_ = _data_->test;
+ _data_->_tmp9_ = _data_->b;
+ _data_->_tmp10_ = NULL;
+ _data_->_state_ = 1;
+ test_out_mismatch (_data_->_tmp8_, 42, _data_->_tmp9_, _vala_main_async_ready, _data_);
+ return FALSE;
+ _state_1:
+ _data_->_tmp11_ = test_out_mismatch_finish (_data_->_tmp8_, _data_->_res_, &_data_->_tmp10_, &_data_->_inner_error0_);
+ _g_variant_unref0 (_data_->c);
+ _data_->c = _data_->_tmp10_;
+ _data_->_tmp7_ = _data_->_tmp11_;
+ if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+ if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT)) {
+ goto __catch0_g_io_error_invalid_argument;
+ }
+ goto __finally0;
+ }
+ _data_->_tmp12_ = _data_->_tmp7_;
+ _data_->_tmp7_ = NULL;
+ _g_free0 (_data_->s);
+ _data_->s = _data_->_tmp12_;
+ _g_free0 (_data_->_tmp7_);
+ }
+ goto __finally0;
+ __catch0_g_io_error_invalid_argument:
+ {
+ g_clear_error (&_data_->_inner_error0_);
+ _data_->caught_error = TRUE;
+ }
+ __finally0:
+ if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+ _g_variant_unref0 (_data_->c);
+ _g_hash_table_unref0 (_data_->b);
+ _g_free0 (_data_->s);
+ _g_object_unref0 (_data_->test);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
+ g_clear_error (&_data_->_inner_error0_);
+ g_object_unref (_data_->_async_result);
+ return FALSE;
+ }
+ _vala_assert (_data_->caught_error, "caught_error");
+ _data_->caught_error = FALSE;
+ {
+ _data_->_tmp14_ = _data_->test;
+ _data_->_tmp15_ = _data_->b;
+ _data_->_tmp16_ = NULL;
+ _data_->_state_ = 2;
+ test_in_mismatch (_data_->_tmp14_, 42, _data_->_tmp15_, _vala_main_async_ready, _data_);
+ return FALSE;
+ _state_2:
+ _data_->_tmp17_ = test_in_mismatch_finish (_data_->_tmp14_, _data_->_res_, &_data_->_tmp16_, &_data_->_inner_error0_);
+ _g_variant_unref0 (_data_->c);
+ _data_->c = _data_->_tmp16_;
+ _data_->_tmp13_ = _data_->_tmp17_;
+ if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+ if (g_error_matches (_data_->_inner_error0_, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS)) {
+ goto __catch1_g_dbus_error_invalid_args;
+ }
+ goto __finally1;
+ }
+ _data_->_tmp18_ = _data_->_tmp13_;
+ _data_->_tmp13_ = NULL;
+ _g_free0 (_data_->s);
+ _data_->s = _data_->_tmp18_;
+ _g_free0 (_data_->_tmp13_);
+ }
+ goto __finally1;
+ __catch1_g_dbus_error_invalid_args:
+ {
+ g_clear_error (&_data_->_inner_error0_);
+ _data_->caught_error = TRUE;
+ }
+ __finally1:
+ if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
+ _g_variant_unref0 (_data_->c);
+ _g_hash_table_unref0 (_data_->b);
+ _g_free0 (_data_->s);
+ _g_object_unref0 (_data_->test);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
+ g_clear_error (&_data_->_inner_error0_);
+ g_object_unref (_data_->_async_result);
+ return FALSE;
+ }
+ _vala_assert (_data_->caught_error, "caught_error");
+ _data_->_tmp19_ = _data_->test;
+ _data_->_tmp20_ = _data_->b;
+ _data_->_tmp21_ = NULL;
+ _data_->_state_ = 3;
+ test_out_mismatch_nothrow (_data_->_tmp19_, 42, _data_->_tmp20_, _vala_main_async_ready, _data_);
+ return FALSE;
+ _state_3:
+ _data_->_tmp22_ = test_out_mismatch_nothrow_finish (_data_->_tmp19_, _data_->_res_, &_data_->_tmp21_);
+ _g_variant_unref0 (_data_->c);
+ _data_->c = _data_->_tmp21_;
+ _g_free0 (_data_->s);
+ _data_->s = _data_->_tmp22_;
+ _data_->_tmp23_ = _data_->s;
+ _vala_assert (_data_->_tmp23_ == NULL, "s == null");
+ _g_variant_unref0 (_data_->c);
+ _g_hash_table_unref0 (_data_->b);
+ _g_free0 (_data_->s);
+ _g_object_unref0 (_data_->test);
+ g_task_return_pointer (_data_->_async_result, _data_, NULL);
+ if (_data_->_state_ != 0) {
+ while (!g_task_get_completed (_data_->_async_result)) {
+ g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
+ }
+ }
+ g_object_unref (_data_->_async_result);
+ return FALSE;
+}
+
+static void
+_vala_main_async_callback (GObject* source_object,
+ GAsyncResult* res,
+ gpointer user_data)
+{
+ GMainLoop* loop = user_data;
+ _vala_main_finish (res);
+ g_main_loop_quit (loop);
+}
+
+int
+main (int argc,
+ char ** argv)
+{
+ GMainLoop* loop = g_main_loop_new (NULL, FALSE);
+ _vala_main_async (_vala_main_async_callback, loop);
+ g_main_loop_run (loop);
+ g_main_loop_unref (loop);
+ return 0;
+}
+
--- /dev/null
+/* dbus_type_mismatch_server.c generated by valac, the Vala compiler
+ * generated from dbus_type_mismatch_server.vala, do not modify */
+
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <glib.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !defined(VALA_STRICT_C)
+#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
+#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
+#elif defined(__clang__) && (__clang_major__ >= 16)
+#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
+#endif
+#endif
+#if !defined(VALA_EXTERN)
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+#define TYPE_TEST (test_get_type ())
+#define TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST, Test))
+#define TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST, TestClass))
+#define IS_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST))
+#define IS_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST))
+#define TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST, TestClass))
+
+typedef struct _Test Test;
+typedef struct _TestClass TestClass;
+typedef struct _TestPrivate TestPrivate;
+enum {
+ TEST_0_PROPERTY,
+ TEST_TEST_PROPERTY_PROPERTY,
+ TEST_NUM_PROPERTIES
+};
+static GParamSpec* test_properties[TEST_NUM_PROPERTIES];
+#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
+enum {
+ TEST_TEST_SIGNAL_SIGNAL,
+ TEST_NUM_SIGNALS
+};
+static guint test_signals[TEST_NUM_SIGNALS] = {0};
+#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _Test {
+ GObject parent_instance;
+ TestPrivate * priv;
+};
+
+struct _TestClass {
+ GObjectClass parent_class;
+};
+
+struct _TestPrivate {
+ gint _test_property;
+};
+
+static gint Test_private_offset;
+static gpointer test_parent_class = NULL;
+VALA_EXTERN GMainLoop* main_loop;
+GMainLoop* main_loop = NULL;
+
+VALA_EXTERN GType test_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (Test, g_object_unref)
+VALA_EXTERN guint test_register_object (void* object,
+ GDBusConnection* connection,
+ const gchar* path,
+ GError** error);
+VALA_EXTERN gint test_out_mismatch (Test* self,
+ gint a,
+ GHashTable* b,
+ GVariant** c,
+ GError** error);
+static GVariant* _variant_new1 (gint value);
+VALA_EXTERN gchar* test_in_mismatch (Test* self,
+ gint64 a,
+ GHashTable* b,
+ GVariant** c,
+ GError** error);
+static GVariant* _variant_new2 (gint value);
+VALA_EXTERN gint test_out_mismatch_nothrow (Test* self,
+ gint a,
+ GHashTable* b,
+ GVariant** c);
+static GVariant* _variant_new3 (gint value);
+VALA_EXTERN Test* test_new (void);
+VALA_EXTERN Test* test_construct (GType object_type);
+VALA_EXTERN gint test_get_test_property (Test* self);
+VALA_EXTERN void test_set_test_property (Test* self,
+ gint value);
+static void test_finalize (GObject * obj);
+static GType test_get_type_once (void);
+static void _vala_test_get_property (GObject * object,
+ guint property_id,
+ GValue * value,
+ GParamSpec * pspec);
+static void _vala_test_set_property (GObject * object,
+ guint property_id,
+ const GValue * value,
+ GParamSpec * pspec);
+static void _dbus_test_out_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation);
+static void _dbus_test_in_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation);
+static void _dbus_test_out_mismatch_nothrow (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation);
+static void test_dbus_interface_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);
+static GVariant* test_dbus_interface_get_property (GDBusConnection* connection,
+ const gchar* sender,
+ const gchar* object_path,
+ const gchar* interface_name,
+ const gchar* property_name,
+ GError** error,
+ gpointer user_data);
+static GVariant* _dbus_test_get_test_property (Test* self);
+static gboolean test_dbus_interface_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);
+static void _dbus_test_set_test_property (Test* self,
+ GVariant* _value);
+static void _dbus_test_test_signal (GObject* _sender,
+ const gchar* s,
+ gpointer* _data);
+static void _test_unregister_object (gpointer user_data);
+VALA_EXTERN void client_exit (GPid pid,
+ gint status);
+static void _vala_main (void);
+static guint _variant_get1 (GVariant* value);
+static void _client_exit_gchild_watch_func (GPid pid,
+ gint wait_status,
+ gpointer self);
+static void _vala_array_destroy (gpointer array,
+ gssize array_length,
+ GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array,
+ gssize array_length,
+ GDestroyNotify destroy_func);
+
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_a = {-1, "a", "i", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_b = {-1, "b", "a{si}", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_c = {-1, "c", "v", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_result = {-1, "result", "i", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_in[] = {&_test_dbus_arg_info_out_mismatch_a, &_test_dbus_arg_info_out_mismatch_b, NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_out[] = {&_test_dbus_arg_info_out_mismatch_c, &_test_dbus_arg_info_out_mismatch_result, NULL};
+static const GDBusMethodInfo _test_dbus_method_info_out_mismatch = {-1, "OutMismatch", (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_in), (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_out), NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_a = {-1, "a", "x", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_b = {-1, "b", "a{si}", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_c = {-1, "c", "v", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_in_mismatch_result = {-1, "result", "s", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_in_mismatch_in[] = {&_test_dbus_arg_info_in_mismatch_a, &_test_dbus_arg_info_in_mismatch_b, NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_in_mismatch_out[] = {&_test_dbus_arg_info_in_mismatch_c, &_test_dbus_arg_info_in_mismatch_result, NULL};
+static const GDBusMethodInfo _test_dbus_method_info_in_mismatch = {-1, "InMismatch", (GDBusArgInfo **) (&_test_dbus_arg_info_in_mismatch_in), (GDBusArgInfo **) (&_test_dbus_arg_info_in_mismatch_out), NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_a = {-1, "a", "i", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_b = {-1, "b", "a{si}", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_c = {-1, "c", "v", NULL};
+static const GDBusArgInfo _test_dbus_arg_info_out_mismatch_nothrow_result = {-1, "result", "i", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_nothrow_in[] = {&_test_dbus_arg_info_out_mismatch_nothrow_a, &_test_dbus_arg_info_out_mismatch_nothrow_b, NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_out_mismatch_nothrow_out[] = {&_test_dbus_arg_info_out_mismatch_nothrow_c, &_test_dbus_arg_info_out_mismatch_nothrow_result, NULL};
+static const GDBusMethodInfo _test_dbus_method_info_out_mismatch_nothrow = {-1, "OutMismatchNothrow", (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_nothrow_in), (GDBusArgInfo **) (&_test_dbus_arg_info_out_mismatch_nothrow_out), NULL};
+static const GDBusMethodInfo * const _test_dbus_method_info[] = {&_test_dbus_method_info_out_mismatch, &_test_dbus_method_info_in_mismatch, &_test_dbus_method_info_out_mismatch_nothrow, NULL};
+static const GDBusArgInfo _test_dbus_arg_info_test_signal_s = {-1, "s", "s", NULL};
+static const GDBusArgInfo * const _test_dbus_arg_info_test_signal[] = {&_test_dbus_arg_info_test_signal_s, NULL};
+static const GDBusSignalInfo _test_dbus_signal_info_test_signal = {-1, "TestSignal", (GDBusArgInfo **) (&_test_dbus_arg_info_test_signal), NULL};
+static const GDBusSignalInfo * const _test_dbus_signal_info[] = {&_test_dbus_signal_info_test_signal, NULL};
+static const GDBusPropertyInfo _test_dbus_property_info_test_property = {-1, "TestProperty", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
+static const GDBusPropertyInfo * const _test_dbus_property_info[] = {&_test_dbus_property_info_test_property, NULL};
+static const GDBusInterfaceInfo _test_dbus_interface_info = {-1, "org.example.Test", (GDBusMethodInfo **) (&_test_dbus_method_info), (GDBusSignalInfo **) (&_test_dbus_signal_info), (GDBusPropertyInfo **) (&_test_dbus_property_info), NULL};
+static const GDBusInterfaceVTable _test_dbus_interface_vtable = {test_dbus_interface_method_call, test_dbus_interface_get_property, test_dbus_interface_set_property};
+
+static inline gpointer
+test_get_instance_private (Test* self)
+{
+ return G_STRUCT_MEMBER_P (self, Test_private_offset);
+}
+
+static GVariant*
+_variant_new1 (gint value)
+{
+ return g_variant_ref_sink (g_variant_new_int32 (value));
+}
+
+gint
+test_out_mismatch (Test* self,
+ gint a,
+ GHashTable* b,
+ GVariant** c,
+ GError** error)
+{
+ GVariant* _vala_c = NULL;
+ GVariant* _tmp0_;
+ gint result;
+ g_return_val_if_fail (IS_TEST (self), -1);
+ g_return_val_if_fail (b != NULL, -1);
+ g_signal_emit (self, test_signals[TEST_TEST_SIGNAL_SIGNAL], 0, "out_mismatch");
+ _tmp0_ = _variant_new1 (1);
+ _g_variant_unref0 (_vala_c);
+ _vala_c = _tmp0_;
+ result = 42;
+ if (c) {
+ *c = _vala_c;
+ } else {
+ _g_variant_unref0 (_vala_c);
+ }
+ return result;
+}
+
+static GVariant*
+_variant_new2 (gint value)
+{
+ return g_variant_ref_sink (g_variant_new_int32 (value));
+}
+
+gchar*
+test_in_mismatch (Test* self,
+ gint64 a,
+ GHashTable* b,
+ GVariant** c,
+ GError** error)
+{
+ GVariant* _vala_c = NULL;
+ GVariant* _tmp0_;
+ gchar* _tmp1_;
+ gchar* result;
+ g_return_val_if_fail (IS_TEST (self), NULL);
+ g_return_val_if_fail (b != NULL, NULL);
+ g_signal_emit (self, test_signals[TEST_TEST_SIGNAL_SIGNAL], 0, "in_mismatch");
+ _tmp0_ = _variant_new2 (1);
+ _g_variant_unref0 (_vala_c);
+ _vala_c = _tmp0_;
+ _tmp1_ = g_strdup ("string");
+ result = _tmp1_;
+ if (c) {
+ *c = _vala_c;
+ } else {
+ _g_variant_unref0 (_vala_c);
+ }
+ return result;
+}
+
+static GVariant*
+_variant_new3 (gint value)
+{
+ return g_variant_ref_sink (g_variant_new_int32 (value));
+}
+
+gint
+test_out_mismatch_nothrow (Test* self,
+ gint a,
+ GHashTable* b,
+ GVariant** c)
+{
+ GVariant* _vala_c = NULL;
+ GVariant* _tmp0_;
+ gint result;
+ g_return_val_if_fail (IS_TEST (self), -1);
+ g_return_val_if_fail (b != NULL, -1);
+ g_signal_emit (self, test_signals[TEST_TEST_SIGNAL_SIGNAL], 0, "out_mismatch_nothrow");
+ _tmp0_ = _variant_new3 (1);
+ _g_variant_unref0 (_vala_c);
+ _vala_c = _tmp0_;
+ result = 42;
+ if (c) {
+ *c = _vala_c;
+ } else {
+ _g_variant_unref0 (_vala_c);
+ }
+ return result;
+}
+
+Test*
+test_construct (GType object_type)
+{
+ Test * self = NULL;
+ self = (Test*) g_object_new (object_type, NULL);
+ return self;
+}
+
+Test*
+test_new (void)
+{
+ return test_construct (TYPE_TEST);
+}
+
+gint
+test_get_test_property (Test* self)
+{
+ gint result;
+ g_return_val_if_fail (IS_TEST (self), -1);
+ result = self->priv->_test_property;
+ return result;
+}
+
+void
+test_set_test_property (Test* self,
+ gint value)
+{
+ gint old_value;
+ g_return_if_fail (IS_TEST (self));
+ old_value = test_get_test_property (self);
+ if (old_value != value) {
+ self->priv->_test_property = value;
+ g_object_notify_by_pspec ((GObject *) self, test_properties[TEST_TEST_PROPERTY_PROPERTY]);
+ }
+}
+
+static void
+test_class_init (TestClass * klass,
+ gpointer klass_data)
+{
+ test_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_adjust_private_offset (klass, &Test_private_offset);
+ G_OBJECT_CLASS (klass)->get_property = _vala_test_get_property;
+ G_OBJECT_CLASS (klass)->set_property = _vala_test_set_property;
+ G_OBJECT_CLASS (klass)->finalize = test_finalize;
+ g_object_class_install_property (G_OBJECT_CLASS (klass), TEST_TEST_PROPERTY_PROPERTY, test_properties[TEST_TEST_PROPERTY_PROPERTY] = g_param_spec_int ("test-property", "test-property", "test-property", G_MININT, G_MAXINT, 42, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ test_signals[TEST_TEST_SIGNAL_SIGNAL] = g_signal_new ("test-signal", TYPE_TEST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
+}
+
+static void
+test_instance_init (Test * self,
+ gpointer klass)
+{
+ self->priv = test_get_instance_private (self);
+ self->priv->_test_property = 42;
+}
+
+static void
+test_finalize (GObject * obj)
+{
+ Test * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEST, Test);
+ G_OBJECT_CLASS (test_parent_class)->finalize (obj);
+}
+
+static GType
+test_get_type_once (void)
+{
+ static const GTypeInfo g_define_type_info = { sizeof (TestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Test), 0, (GInstanceInitFunc) test_instance_init, NULL };
+ GType test_type_id;
+ test_type_id = g_type_register_static (G_TYPE_OBJECT, "Test", &g_define_type_info, 0);
+ g_type_set_qdata (test_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) test_register_object);
+ Test_private_offset = g_type_add_instance_private (test_type_id, sizeof (TestPrivate));
+ return test_type_id;
+}
+
+GType
+test_get_type (void)
+{
+ static volatile gsize test_type_id__once = 0;
+ if (g_once_init_enter (&test_type_id__once)) {
+ GType test_type_id;
+ test_type_id = test_get_type_once ();
+ g_once_init_leave (&test_type_id__once, test_type_id);
+ }
+ return test_type_id__once;
+}
+
+static void
+_vala_test_get_property (GObject * object,
+ guint property_id,
+ GValue * value,
+ GParamSpec * pspec)
+{
+ Test * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TEST, Test);
+ switch (property_id) {
+ case TEST_TEST_PROPERTY_PROPERTY:
+ g_value_set_int (value, test_get_test_property (self));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+_vala_test_set_property (GObject * object,
+ guint property_id,
+ const GValue * value,
+ GParamSpec * pspec)
+{
+ Test * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TEST, Test);
+ switch (property_id) {
+ case TEST_TEST_PROPERTY_PROPERTY:
+ test_set_test_property (self, g_value_get_int (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+_dbus_test_out_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation)
+{
+ GError* error = NULL;
+ GVariantIter _arguments_iter;
+ gint a = 0;
+ GVariant* _tmp0_;
+ GHashTable* b = NULL;
+ GVariant* _tmp1_;
+ GHashTable* _tmp2_;
+ GVariantIter _tmp3_;
+ GVariant* _tmp4_;
+ GVariant* _tmp5_;
+ GDBusMessage* _reply_message = NULL;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ GVariant* c = NULL;
+ gint result;
+ g_variant_iter_init (&_arguments_iter, _parameters_);
+ _tmp0_ = g_variant_iter_next_value (&_arguments_iter);
+ a = g_variant_get_int32 (_tmp0_);
+ g_variant_unref (_tmp0_);
+ _tmp1_ = g_variant_iter_next_value (&_arguments_iter);
+ _tmp2_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp3_, _tmp1_);
+ while (g_variant_iter_loop (&_tmp3_, "{?*}", &_tmp4_, &_tmp5_)) {
+ g_hash_table_insert (_tmp2_, g_variant_dup_string (_tmp4_, NULL), (gpointer) ((gintptr) g_variant_get_int32 (_tmp5_)));
+ }
+ b = _tmp2_;
+ g_variant_unref (_tmp1_);
+ result = test_out_mismatch (self, a, b, &c, &error);
+ if (error) {
+ g_dbus_method_invocation_take_error (invocation, error);
+ goto _error;
+ }
+ _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
+ g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (c));
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_int32 (result));
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
+ g_object_unref (invocation);
+ g_object_unref (_reply_message);
+ _error:
+ _g_hash_table_unref0 (b);
+ _g_variant_unref0 (c);
+ ;
+}
+
+static void
+_dbus_test_in_mismatch (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation)
+{
+ GError* error = NULL;
+ GVariantIter _arguments_iter;
+ gint64 a = 0LL;
+ GVariant* _tmp6_;
+ GHashTable* b = NULL;
+ GVariant* _tmp7_;
+ GHashTable* _tmp8_;
+ GVariantIter _tmp9_;
+ GVariant* _tmp10_;
+ GVariant* _tmp11_;
+ GDBusMessage* _reply_message = NULL;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ GVariant* c = NULL;
+ gchar* result;
+ g_variant_iter_init (&_arguments_iter, _parameters_);
+ _tmp6_ = g_variant_iter_next_value (&_arguments_iter);
+ a = g_variant_get_int64 (_tmp6_);
+ g_variant_unref (_tmp6_);
+ _tmp7_ = g_variant_iter_next_value (&_arguments_iter);
+ _tmp8_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp9_, _tmp7_);
+ while (g_variant_iter_loop (&_tmp9_, "{?*}", &_tmp10_, &_tmp11_)) {
+ g_hash_table_insert (_tmp8_, g_variant_dup_string (_tmp10_, NULL), (gpointer) ((gintptr) g_variant_get_int32 (_tmp11_)));
+ }
+ b = _tmp8_;
+ g_variant_unref (_tmp7_);
+ result = test_in_mismatch (self, a, b, &c, &error);
+ if (error) {
+ g_dbus_method_invocation_take_error (invocation, error);
+ goto _error;
+ }
+ _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
+ g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (c));
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
+ _g_free0 (result);
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
+ g_object_unref (invocation);
+ g_object_unref (_reply_message);
+ _error:
+ _g_hash_table_unref0 (b);
+ _g_variant_unref0 (c);
+ ;
+}
+
+static void
+_dbus_test_out_mismatch_nothrow (Test* self,
+ GVariant* _parameters_,
+ GDBusMethodInvocation* invocation)
+{
+ GError* error = NULL;
+ GVariantIter _arguments_iter;
+ gint a = 0;
+ GVariant* _tmp12_;
+ GHashTable* b = NULL;
+ GVariant* _tmp13_;
+ GHashTable* _tmp14_;
+ GVariantIter _tmp15_;
+ GVariant* _tmp16_;
+ GVariant* _tmp17_;
+ GDBusMessage* _reply_message = NULL;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ GVariant* c = NULL;
+ gint result;
+ g_variant_iter_init (&_arguments_iter, _parameters_);
+ _tmp12_ = g_variant_iter_next_value (&_arguments_iter);
+ a = g_variant_get_int32 (_tmp12_);
+ g_variant_unref (_tmp12_);
+ _tmp13_ = g_variant_iter_next_value (&_arguments_iter);
+ _tmp14_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp15_, _tmp13_);
+ while (g_variant_iter_loop (&_tmp15_, "{?*}", &_tmp16_, &_tmp17_)) {
+ g_hash_table_insert (_tmp14_, g_variant_dup_string (_tmp16_, NULL), (gpointer) ((gintptr) g_variant_get_int32 (_tmp17_)));
+ }
+ b = _tmp14_;
+ g_variant_unref (_tmp13_);
+ result = test_out_mismatch_nothrow (self, a, b, &c);
+ _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
+ g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (c));
+ g_variant_builder_add_value (&_reply_builder, g_variant_new_int32 (result));
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
+ g_object_unref (invocation);
+ g_object_unref (_reply_message);
+ _g_hash_table_unref0 (b);
+ _g_variant_unref0 (c);
+}
+
+static void
+test_dbus_interface_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)
+{
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (method_name, "OutMismatch") == 0) {
+ _dbus_test_out_mismatch (object, parameters, invocation);
+ } else if (strcmp (method_name, "InMismatch") == 0) {
+ _dbus_test_in_mismatch (object, parameters, invocation);
+ } else if (strcmp (method_name, "OutMismatchNothrow") == 0) {
+ _dbus_test_out_mismatch_nothrow (object, parameters, invocation);
+ } else {
+ g_object_unref (invocation);
+ }
+}
+
+static GVariant*
+_dbus_test_get_test_property (Test* self)
+{
+ gint result;
+ GVariant* _reply;
+ result = test_get_test_property (self);
+ _reply = g_variant_new_int32 (result);
+ return _reply;
+}
+
+static GVariant*
+test_dbus_interface_get_property (GDBusConnection* connection,
+ const gchar* sender,
+ const gchar* object_path,
+ const gchar* interface_name,
+ const gchar* property_name,
+ GError** error,
+ gpointer user_data)
+{
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "TestProperty") == 0) {
+ return _dbus_test_get_test_property (object);
+ }
+ return NULL;
+}
+
+static void
+_dbus_test_set_test_property (Test* self,
+ GVariant* _value)
+{
+ gint value = 0;
+ value = g_variant_get_int32 (_value);
+ test_set_test_property (self, value);
+}
+
+static gboolean
+test_dbus_interface_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)
+{
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "TestProperty") == 0) {
+ _dbus_test_set_test_property (object, value);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+_dbus_test_test_signal (GObject* _sender,
+ const gchar* s,
+ gpointer* _data)
+{
+ GDBusConnection * _connection;
+ const gchar * _path;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ _connection = _data[1];
+ _path = _data[2];
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (s));
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ g_dbus_connection_emit_signal (_connection, NULL, _path, "org.example.Test", "TestSignal", _arguments, NULL);
+}
+
+guint
+test_register_object (gpointer object,
+ GDBusConnection* connection,
+ const gchar* path,
+ GError** error)
+{
+ guint result;
+ gpointer *data;
+ data = g_new (gpointer, 3);
+ data[0] = g_object_ref (object);
+ data[1] = g_object_ref (connection);
+ data[2] = g_strdup (path);
+ result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_test_dbus_interface_info), &_test_dbus_interface_vtable, data, _test_unregister_object, error);
+ if (!result) {
+ return 0;
+ }
+ g_signal_connect (object, "test-signal", (GCallback) _dbus_test_test_signal, data);
+ return result;
+}
+
+static void
+_test_unregister_object (gpointer user_data)
+{
+ gpointer* data;
+ data = user_data;
+ g_signal_handlers_disconnect_by_func (data[0], _dbus_test_test_signal, data);
+ g_object_unref (data[0]);
+ g_object_unref (data[1]);
+ g_free (data[2]);
+ g_free (data);
+}
+
+void
+client_exit (GPid pid,
+ gint status)
+{
+ GMainLoop* _tmp0_;
+ _vala_assert (status == 0, "status == 0");
+ _tmp0_ = main_loop;
+ g_main_loop_quit (_tmp0_);
+}
+
+static guint
+_variant_get1 (GVariant* value)
+{
+ return g_variant_get_uint32 (value);
+}
+
+static void
+_client_exit_gchild_watch_func (GPid pid,
+ gint wait_status,
+ gpointer self)
+{
+ client_exit (pid, wait_status);
+}
+
+static void
+_vala_main (void)
+{
+ GDBusConnection* conn = NULL;
+ GDBusConnection* _tmp0_;
+ GDBusConnection* _tmp1_;
+ Test* _tmp2_;
+ Test* _tmp3_;
+ GVariant* request_result = NULL;
+ GDBusConnection* _tmp4_;
+ GVariant* _tmp5_;
+ GVariant* _tmp6_;
+ GVariant* _tmp7_;
+ GVariant* _tmp8_;
+ GVariant* _tmp9_;
+ GVariant* _tmp10_;
+ GVariant* _tmp11_;
+ guint _tmp12_;
+ GPid client_pid = 0;
+ gchar* _tmp13_;
+ gchar** _tmp14_;
+ gchar** _tmp15_;
+ gint _tmp15__length1;
+ GPid _tmp16_ = 0;
+ GMainLoop* _tmp17_;
+ GMainLoop* _tmp18_;
+ GError* _inner_error0_ = NULL;
+ g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ _tmp0_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error0_);
+ conn = _tmp0_;
+ if (G_UNLIKELY (_inner_error0_ != NULL)) {
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
+ g_clear_error (&_inner_error0_);
+ return;
+ }
+ _tmp1_ = conn;
+ _tmp2_ = test_new ();
+ _tmp3_ = _tmp2_;
+ test_register_object (_tmp3_, _tmp1_, "/org/example/test", &_inner_error0_);
+ _g_object_unref0 (_tmp3_);
+ if (G_UNLIKELY (_inner_error0_ != NULL)) {
+ _g_object_unref0 (conn);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
+ g_clear_error (&_inner_error0_);
+ return;
+ }
+ _tmp4_ = conn;
+ _tmp5_ = g_variant_new ("(su)", "org.example.Test", 0x4, NULL);
+ g_variant_ref_sink (_tmp5_);
+ _tmp6_ = _tmp5_;
+ _tmp7_ = g_dbus_connection_call_sync (_tmp4_, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "RequestName", _tmp6_, NULL, 0, -1, NULL, &_inner_error0_);
+ _tmp8_ = _tmp7_;
+ _g_variant_unref0 (_tmp6_);
+ request_result = _tmp8_;
+ if (G_UNLIKELY (_inner_error0_ != NULL)) {
+ _g_object_unref0 (conn);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
+ g_clear_error (&_inner_error0_);
+ return;
+ }
+ _tmp9_ = request_result;
+ _tmp10_ = g_variant_get_child_value (_tmp9_, (gsize) 0);
+ _tmp11_ = _tmp10_;
+ _tmp12_ = _variant_get1 (_tmp11_);
+ _vala_assert (_tmp12_ == ((guint) 1), "(uint) request_result.get_child_value (0) == 1");
+ _g_variant_unref0 (_tmp11_);
+ _tmp13_ = g_strdup ("dbus_type_mismatch_client");
+ _tmp14_ = g_new0 (gchar*, 1 + 1);
+ _tmp14_[0] = _tmp13_;
+ _tmp15_ = _tmp14_;
+ _tmp15__length1 = 1;
+ g_spawn_async (NULL, _tmp15_, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &_tmp16_, &_inner_error0_);
+ client_pid = _tmp16_;
+ _tmp15_ = (_vala_array_free (_tmp15_, _tmp15__length1, (GDestroyNotify) g_free), NULL);
+ if (G_UNLIKELY (_inner_error0_ != NULL)) {
+ _g_variant_unref0 (request_result);
+ _g_object_unref0 (conn);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
+ g_clear_error (&_inner_error0_);
+ return;
+ }
+ g_child_watch_add_full (G_PRIORITY_DEFAULT_IDLE, client_pid, _client_exit_gchild_watch_func, NULL, NULL);
+ _tmp17_ = g_main_loop_new (NULL, FALSE);
+ _g_main_loop_unref0 (main_loop);
+ main_loop = _tmp17_;
+ _tmp18_ = main_loop;
+ g_main_loop_run (_tmp18_);
+ _g_variant_unref0 (request_result);
+ _g_object_unref0 (conn);
+}
+
+int
+main (int argc,
+ char ** argv)
+{
+ _vala_main ();
+ return 0;
+}
+
+static void
+_vala_array_destroy (gpointer array,
+ gssize array_length,
+ GDestroyNotify destroy_func)
+{
+ if ((array != NULL) && (destroy_func != NULL)) {
+ gssize i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+static void
+_vala_array_free (gpointer array,
+ gssize array_length,
+ GDestroyNotify destroy_func)
+{
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+