2 * Generated by gdbus-codegen 2.32.3. DO NOT EDIT.
4 * The license of this code is the same as for the source it was derived from.
11 #include "gdbus-test-codegen-generated.h"
14 # include <gio/gunixfdlist.h>
19 GDBusArgInfo parent_struct;
20 gboolean use_gvariant;
21 } _ExtendedGDBusArgInfo;
25 GDBusMethodInfo parent_struct;
26 const gchar *signal_name;
28 } _ExtendedGDBusMethodInfo;
32 GDBusSignalInfo parent_struct;
33 const gchar *signal_name;
34 } _ExtendedGDBusSignalInfo;
38 GDBusPropertyInfo parent_struct;
39 const gchar *hyphen_name;
40 gboolean use_gvariant;
41 } _ExtendedGDBusPropertyInfo;
45 GDBusInterfaceInfo parent_struct;
46 const gchar *hyphen_name;
47 } _ExtendedGDBusInterfaceInfo;
51 const _ExtendedGDBusPropertyInfo *info;
53 GValue orig_value; /* the value before the change */
57 _changed_property_free (ChangedProperty *data)
59 g_value_unset (&data->orig_value);
64 _g_strv_equal0 (gchar **a, gchar **b)
68 if (a == NULL && b == NULL)
73 if (a == NULL || b == NULL)
75 if (g_strv_length (a) != g_strv_length (b))
77 for (n = 0; a[n] != NULL; n++)
78 if (g_strcmp0 (a[n], b[n]) != 0)
86 _g_variant_equal0 (GVariant *a, GVariant *b)
89 if (a == NULL && b == NULL)
94 if (a == NULL || b == NULL)
96 ret = g_variant_equal (a, b);
101 G_GNUC_UNUSED static gboolean
102 _g_value_equal (const GValue *a, const GValue *b)
104 gboolean ret = FALSE;
105 g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
106 switch (G_VALUE_TYPE (a))
109 ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
112 ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
115 ret = (g_value_get_int (a) == g_value_get_int (b));
118 ret = (g_value_get_uint (a) == g_value_get_uint (b));
121 ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
124 ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
127 ret = (g_value_get_double (a) == g_value_get_double (b));
130 ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
133 ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
136 if (G_VALUE_TYPE (a) == G_TYPE_STRV)
137 ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
139 g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
145 /* ------------------------------------------------------------------------
146 * Code for interface org.project.Bar
147 * ------------------------------------------------------------------------
153 * @short_description: Generated C code for the org.project.Bar D-Bus interface
155 * This section contains code for working with the <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link> D-Bus interface in C.
158 /* ---- Introspection data for org.project.Bar ---- */
160 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_hello_world_IN_ARG_greeting =
171 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_hello_world_IN_ARG_pointers[] =
173 &_foo_igen_bar_method_info_hello_world_IN_ARG_greeting,
177 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_hello_world_OUT_ARG_response =
188 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_hello_world_OUT_ARG_pointers[] =
190 &_foo_igen_bar_method_info_hello_world_OUT_ARG_response,
194 static const GDBusAnnotationInfo _foo_igen_bar_method_hello_world_annotation_info_0 =
202 static const GDBusAnnotationInfo _foo_igen_bar_method_hello_world_annotation_info_1 =
205 "ExistingAnnotation",
210 static const GDBusAnnotationInfo * const _foo_igen_bar_method_hello_world_annotation_info_pointers[] =
212 &_foo_igen_bar_method_hello_world_annotation_info_0,
213 &_foo_igen_bar_method_hello_world_annotation_info_1,
217 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_hello_world =
222 (GDBusArgInfo **) &_foo_igen_bar_method_info_hello_world_IN_ARG_pointers,
223 (GDBusArgInfo **) &_foo_igen_bar_method_info_hello_world_OUT_ARG_pointers,
224 (GDBusAnnotationInfo **) &_foo_igen_bar_method_hello_world_annotation_info_pointers
226 "handle-hello-world",
230 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_byte =
241 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_boolean =
252 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_int16 =
263 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_uint16 =
274 static const GDBusAnnotationInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_arg_val_int32_annotation_info_0 =
282 static const GDBusAnnotationInfo * const _foo_igen_bar_method_info_test_primitive_types_IN_ARG_arg_val_int32_annotation_info_pointers[] =
284 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_arg_val_int32_annotation_info_0,
288 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_int32 =
294 (GDBusAnnotationInfo **) &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_arg_val_int32_annotation_info_pointers
299 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_uint32 =
310 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_int64 =
321 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_uint64 =
332 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_double =
343 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_string =
354 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_objpath =
365 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_signature =
376 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_bytestring =
387 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_test_primitive_types_IN_ARG_pointers[] =
389 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_byte,
390 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_boolean,
391 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_int16,
392 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_uint16,
393 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_int32,
394 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_uint32,
395 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_int64,
396 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_uint64,
397 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_double,
398 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_string,
399 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_objpath,
400 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_signature,
401 &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_val_bytestring,
405 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_byte =
416 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_boolean =
427 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_int16 =
438 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_uint16 =
449 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_int32 =
460 static const GDBusAnnotationInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_arg_ret_uint32_annotation_info_0 =
468 static const GDBusAnnotationInfo * const _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_arg_ret_uint32_annotation_info_pointers[] =
470 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_arg_ret_uint32_annotation_info_0,
474 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_uint32 =
480 (GDBusAnnotationInfo **) &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_arg_ret_uint32_annotation_info_pointers
485 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_int64 =
496 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_uint64 =
507 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_double =
518 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_string =
529 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_objpath =
540 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_signature =
551 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_bytestring =
562 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_test_primitive_types_OUT_ARG_pointers[] =
564 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_byte,
565 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_boolean,
566 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_int16,
567 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_uint16,
568 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_int32,
569 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_uint32,
570 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_int64,
571 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_uint64,
572 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_double,
573 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_string,
574 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_objpath,
575 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_signature,
576 &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_ret_bytestring,
580 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_test_primitive_types =
584 "TestPrimitiveTypes",
585 (GDBusArgInfo **) &_foo_igen_bar_method_info_test_primitive_types_IN_ARG_pointers,
586 (GDBusArgInfo **) &_foo_igen_bar_method_info_test_primitive_types_OUT_ARG_pointers,
589 "handle-test-primitive-types",
593 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_dict_s_to_s =
604 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_dict_s_to_pairs =
615 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_a_struct =
626 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_strings =
637 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_objpaths =
648 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_signatures =
652 "array_of_signatures",
659 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_bytestrings =
663 "array_of_bytestrings",
670 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_pointers[] =
672 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_dict_s_to_s,
673 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_dict_s_to_pairs,
674 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_a_struct,
675 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_strings,
676 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_objpaths,
677 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_signatures,
678 &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_array_of_bytestrings,
682 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_test_non_primitive_types_OUT_ARG_result =
693 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_test_non_primitive_types_OUT_ARG_pointers[] =
695 &_foo_igen_bar_method_info_test_non_primitive_types_OUT_ARG_result,
699 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_test_non_primitive_types =
703 "TestNonPrimitiveTypes",
704 (GDBusArgInfo **) &_foo_igen_bar_method_info_test_non_primitive_types_IN_ARG_pointers,
705 (GDBusArgInfo **) &_foo_igen_bar_method_info_test_non_primitive_types_OUT_ARG_pointers,
708 "handle-test-non-primitive-types",
712 static const _ExtendedGDBusArgInfo _foo_igen_bar_method_info_request_signal_emission_IN_ARG_which_one =
723 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_method_info_request_signal_emission_IN_ARG_pointers[] =
725 &_foo_igen_bar_method_info_request_signal_emission_IN_ARG_which_one,
729 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_request_signal_emission =
733 "RequestSignalEmission",
734 (GDBusArgInfo **) &_foo_igen_bar_method_info_request_signal_emission_IN_ARG_pointers,
738 "handle-request-signal-emission",
742 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_request_multi_property_mods =
746 "RequestMultiPropertyMods",
751 "handle-request-multi-property-mods",
755 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_unimplemented_method =
759 "UnimplementedMethod",
764 "handle-unimplemented-method",
768 static const _ExtendedGDBusMethodInfo _foo_igen_bar_method_info_property_cancellation =
772 "PropertyCancellation",
777 "handle-property-cancellation",
781 static const _ExtendedGDBusMethodInfo * const _foo_igen_bar_method_info_pointers[] =
783 &_foo_igen_bar_method_info_hello_world,
784 &_foo_igen_bar_method_info_test_primitive_types,
785 &_foo_igen_bar_method_info_test_non_primitive_types,
786 &_foo_igen_bar_method_info_request_signal_emission,
787 &_foo_igen_bar_method_info_request_multi_property_mods,
788 &_foo_igen_bar_method_info_unimplemented_method,
789 &_foo_igen_bar_method_info_property_cancellation,
793 static const _ExtendedGDBusArgInfo _foo_igen_bar_signal_info_test_signal_ARG_val_int32 =
804 static const GDBusAnnotationInfo _foo_igen_bar_signal_info_test_signal_ARG_arg_array_of_strings_annotation_info_0 =
812 static const GDBusAnnotationInfo * const _foo_igen_bar_signal_info_test_signal_ARG_arg_array_of_strings_annotation_info_pointers[] =
814 &_foo_igen_bar_signal_info_test_signal_ARG_arg_array_of_strings_annotation_info_0,
818 static const _ExtendedGDBusArgInfo _foo_igen_bar_signal_info_test_signal_ARG_array_of_strings =
824 (GDBusAnnotationInfo **) &_foo_igen_bar_signal_info_test_signal_ARG_arg_array_of_strings_annotation_info_pointers
829 static const _ExtendedGDBusArgInfo _foo_igen_bar_signal_info_test_signal_ARG_array_of_bytestrings =
833 "array_of_bytestrings",
840 static const _ExtendedGDBusArgInfo _foo_igen_bar_signal_info_test_signal_ARG_dict_s_to_pairs =
851 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_signal_info_test_signal_ARG_pointers[] =
853 &_foo_igen_bar_signal_info_test_signal_ARG_val_int32,
854 &_foo_igen_bar_signal_info_test_signal_ARG_array_of_strings,
855 &_foo_igen_bar_signal_info_test_signal_ARG_array_of_bytestrings,
856 &_foo_igen_bar_signal_info_test_signal_ARG_dict_s_to_pairs,
860 static const GDBusAnnotationInfo _foo_igen_bar_signal_test_signal_annotation_info_0 =
868 static const GDBusAnnotationInfo * const _foo_igen_bar_signal_test_signal_annotation_info_pointers[] =
870 &_foo_igen_bar_signal_test_signal_annotation_info_0,
874 static const _ExtendedGDBusSignalInfo _foo_igen_bar_signal_info_test_signal =
879 (GDBusArgInfo **) &_foo_igen_bar_signal_info_test_signal_ARG_pointers,
880 (GDBusAnnotationInfo **) &_foo_igen_bar_signal_test_signal_annotation_info_pointers
885 static const _ExtendedGDBusArgInfo _foo_igen_bar_signal_info_another_signal_ARG_word =
896 static const _ExtendedGDBusArgInfo * const _foo_igen_bar_signal_info_another_signal_ARG_pointers[] =
898 &_foo_igen_bar_signal_info_another_signal_ARG_word,
902 static const _ExtendedGDBusSignalInfo _foo_igen_bar_signal_info_another_signal =
907 (GDBusArgInfo **) &_foo_igen_bar_signal_info_another_signal_ARG_pointers,
913 static const _ExtendedGDBusSignalInfo * const _foo_igen_bar_signal_info_pointers[] =
915 &_foo_igen_bar_signal_info_test_signal,
916 &_foo_igen_bar_signal_info_another_signal,
920 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_y =
926 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
933 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_b =
939 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
946 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_n =
952 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
959 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_q =
965 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
972 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_i =
978 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
985 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_u =
991 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
998 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_x =
1004 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1011 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_t =
1017 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1024 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_d =
1030 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1037 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_s =
1043 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1050 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_o =
1056 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1063 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_g =
1069 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1076 static const GDBusAnnotationInfo _foo_igen_bar_property_ay_annotation_info_0 =
1084 static const GDBusAnnotationInfo * const _foo_igen_bar_property_ay_annotation_info_pointers[] =
1086 &_foo_igen_bar_property_ay_annotation_info_0,
1090 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_ay =
1096 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1097 (GDBusAnnotationInfo **) &_foo_igen_bar_property_ay_annotation_info_pointers
1103 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_as =
1109 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1116 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_aay =
1122 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1129 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_ao =
1135 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1142 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_ag =
1148 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1155 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_finally_normal_name =
1159 "FinallyNormalName",
1161 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1164 "finally-normal-name",
1168 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_readonly_property =
1174 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
1177 "readonly-property",
1181 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_writeonly_property =
1185 "WriteonlyProperty",
1187 G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1190 "writeonly-property",
1194 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_i =
1200 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1207 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_d =
1213 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1220 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_s =
1226 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1233 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_o =
1239 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1246 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_g =
1252 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1259 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_ay =
1265 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1272 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_as =
1278 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1285 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_ao =
1291 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1298 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_ag =
1304 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1311 static const _ExtendedGDBusPropertyInfo _foo_igen_bar_property_info_unset_struct =
1317 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
1324 static const _ExtendedGDBusPropertyInfo * const _foo_igen_bar_property_info_pointers[] =
1326 &_foo_igen_bar_property_info_y,
1327 &_foo_igen_bar_property_info_b,
1328 &_foo_igen_bar_property_info_n,
1329 &_foo_igen_bar_property_info_q,
1330 &_foo_igen_bar_property_info_i,
1331 &_foo_igen_bar_property_info_u,
1332 &_foo_igen_bar_property_info_x,
1333 &_foo_igen_bar_property_info_t,
1334 &_foo_igen_bar_property_info_d,
1335 &_foo_igen_bar_property_info_s,
1336 &_foo_igen_bar_property_info_o,
1337 &_foo_igen_bar_property_info_g,
1338 &_foo_igen_bar_property_info_ay,
1339 &_foo_igen_bar_property_info_as,
1340 &_foo_igen_bar_property_info_aay,
1341 &_foo_igen_bar_property_info_ao,
1342 &_foo_igen_bar_property_info_ag,
1343 &_foo_igen_bar_property_info_finally_normal_name,
1344 &_foo_igen_bar_property_info_readonly_property,
1345 &_foo_igen_bar_property_info_writeonly_property,
1346 &_foo_igen_bar_property_info_unset_i,
1347 &_foo_igen_bar_property_info_unset_d,
1348 &_foo_igen_bar_property_info_unset_s,
1349 &_foo_igen_bar_property_info_unset_o,
1350 &_foo_igen_bar_property_info_unset_g,
1351 &_foo_igen_bar_property_info_unset_ay,
1352 &_foo_igen_bar_property_info_unset_as,
1353 &_foo_igen_bar_property_info_unset_ao,
1354 &_foo_igen_bar_property_info_unset_ag,
1355 &_foo_igen_bar_property_info_unset_struct,
1359 static const GDBusAnnotationInfo _foo_igen_bar_annotation_info_0 =
1367 static const GDBusAnnotationInfo * const _foo_igen_bar_annotation_info_pointers[] =
1369 &_foo_igen_bar_annotation_info_0,
1373 static const _ExtendedGDBusInterfaceInfo _foo_igen_bar_interface_info =
1378 (GDBusMethodInfo **) &_foo_igen_bar_method_info_pointers,
1379 (GDBusSignalInfo **) &_foo_igen_bar_signal_info_pointers,
1380 (GDBusPropertyInfo **) &_foo_igen_bar_property_info_pointers,
1381 (GDBusAnnotationInfo **) &_foo_igen_bar_annotation_info_pointers
1388 * foo_igen_bar_interface_info:
1390 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link> D-Bus interface.
1392 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
1394 GDBusInterfaceInfo *
1395 foo_igen_bar_interface_info (void)
1397 return (GDBusInterfaceInfo *) &_foo_igen_bar_interface_info;
1401 * foo_igen_bar_override_properties:
1402 * @klass: The class structure for a #GObject<!-- -->-derived class.
1403 * @property_id_begin: The property id to assign to the first overridden property.
1405 * Overrides all #GObject properties in the #FooiGenBar interface for a concrete class.
1406 * The properties are overridden in the order they are defined.
1408 * Returns: The last property id.
1411 foo_igen_bar_override_properties (GObjectClass *klass, guint property_id_begin)
1413 g_object_class_override_property (klass, property_id_begin++, "y");
1414 g_object_class_override_property (klass, property_id_begin++, "b");
1415 g_object_class_override_property (klass, property_id_begin++, "n");
1416 g_object_class_override_property (klass, property_id_begin++, "q");
1417 g_object_class_override_property (klass, property_id_begin++, "i");
1418 g_object_class_override_property (klass, property_id_begin++, "u");
1419 g_object_class_override_property (klass, property_id_begin++, "x");
1420 g_object_class_override_property (klass, property_id_begin++, "t");
1421 g_object_class_override_property (klass, property_id_begin++, "d");
1422 g_object_class_override_property (klass, property_id_begin++, "s");
1423 g_object_class_override_property (klass, property_id_begin++, "o");
1424 g_object_class_override_property (klass, property_id_begin++, "g");
1425 g_object_class_override_property (klass, property_id_begin++, "ay");
1426 g_object_class_override_property (klass, property_id_begin++, "as");
1427 g_object_class_override_property (klass, property_id_begin++, "aay");
1428 g_object_class_override_property (klass, property_id_begin++, "ao");
1429 g_object_class_override_property (klass, property_id_begin++, "ag");
1430 g_object_class_override_property (klass, property_id_begin++, "finally-normal-name");
1431 g_object_class_override_property (klass, property_id_begin++, "readonly-property");
1432 g_object_class_override_property (klass, property_id_begin++, "writeonly-property");
1433 g_object_class_override_property (klass, property_id_begin++, "unset-i");
1434 g_object_class_override_property (klass, property_id_begin++, "unset-d");
1435 g_object_class_override_property (klass, property_id_begin++, "unset-s");
1436 g_object_class_override_property (klass, property_id_begin++, "unset-o");
1437 g_object_class_override_property (klass, property_id_begin++, "unset-g");
1438 g_object_class_override_property (klass, property_id_begin++, "unset-ay");
1439 g_object_class_override_property (klass, property_id_begin++, "unset-as");
1440 g_object_class_override_property (klass, property_id_begin++, "unset-ao");
1441 g_object_class_override_property (klass, property_id_begin++, "unset-ag");
1442 g_object_class_override_property (klass, property_id_begin++, "unset-struct");
1443 return property_id_begin - 1;
1451 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link>.
1456 * @parent_iface: The parent interface.
1457 * @handle_hello_world: Handler for the #FooiGenBar::handle-hello-world signal.
1458 * @handle_property_cancellation: Handler for the #FooiGenBar::handle-property-cancellation signal.
1459 * @handle_request_multi_property_mods: Handler for the #FooiGenBar::handle-request-multi-property-mods signal.
1460 * @handle_request_signal_emission: Handler for the #FooiGenBar::handle-request-signal-emission signal.
1461 * @handle_test_non_primitive_types: Handler for the #FooiGenBar::handle-test-non-primitive-types signal.
1462 * @handle_test_primitive_types: Handler for the #FooiGenBar::handle-test-primitive-types signal.
1463 * @handle_unimplemented_method: Handler for the #FooiGenBar::handle-unimplemented-method signal.
1464 * @get_aay: Getter for the #FooiGenBar:aay property.
1465 * @get_ag: Getter for the #FooiGenBar:ag property.
1466 * @get_ao: Getter for the #FooiGenBar:ao property.
1467 * @get_as: Getter for the #FooiGenBar:as property.
1468 * @get_ay: Getter for the #FooiGenBar:ay property.
1469 * @get_b: Getter for the #FooiGenBar:b property.
1470 * @get_d: Getter for the #FooiGenBar:d property.
1471 * @get_finally_normal_name: Getter for the #FooiGenBar:finally-normal-name property.
1472 * @get_g: Getter for the #FooiGenBar:g property.
1473 * @get_i: Getter for the #FooiGenBar:i property.
1474 * @get_n: Getter for the #FooiGenBar:n property.
1475 * @get_o: Getter for the #FooiGenBar:o property.
1476 * @get_q: Getter for the #FooiGenBar:q property.
1477 * @get_readonly_property: Getter for the #FooiGenBar:readonly-property property.
1478 * @get_s: Getter for the #FooiGenBar:s property.
1479 * @get_t: Getter for the #FooiGenBar:t property.
1480 * @get_u: Getter for the #FooiGenBar:u property.
1481 * @get_unset_ag: Getter for the #FooiGenBar:unset-ag property.
1482 * @get_unset_ao: Getter for the #FooiGenBar:unset-ao property.
1483 * @get_unset_as: Getter for the #FooiGenBar:unset-as property.
1484 * @get_unset_ay: Getter for the #FooiGenBar:unset-ay property.
1485 * @get_unset_d: Getter for the #FooiGenBar:unset-d property.
1486 * @get_unset_g: Getter for the #FooiGenBar:unset-g property.
1487 * @get_unset_i: Getter for the #FooiGenBar:unset-i property.
1488 * @get_unset_o: Getter for the #FooiGenBar:unset-o property.
1489 * @get_unset_s: Getter for the #FooiGenBar:unset-s property.
1490 * @get_unset_struct: Getter for the #FooiGenBar:unset-struct property.
1491 * @get_writeonly_property: Getter for the #FooiGenBar:writeonly-property property.
1492 * @get_x: Getter for the #FooiGenBar:x property.
1493 * @get_y: Getter for the #FooiGenBar:y property.
1494 * @another_signal: Handler for the #FooiGenBar::another-signal signal.
1495 * @test_signal: Handler for the #FooiGenBar::test-signal signal.
1497 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link>.
1501 foo_igen_bar_default_init (FooiGenBarIface *iface)
1503 /* GObject signals for incoming D-Bus method calls: */
1505 * FooiGenBar::handle-hello-world:
1506 * @object: A #FooiGenBar.
1507 * @invocation: A #GDBusMethodInvocation.
1508 * @arg_greeting: Argument passed by remote caller.
1510 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.HelloWorld">HelloWorld()</link> D-Bus method.
1512 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_hello_world() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1514 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1516 g_signal_new ("handle-hello-world",
1517 G_TYPE_FROM_INTERFACE (iface),
1519 G_STRUCT_OFFSET (FooiGenBarIface, handle_hello_world),
1520 g_signal_accumulator_true_handled,
1522 g_cclosure_marshal_generic,
1525 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1528 * FooiGenBar::handle-test-primitive-types:
1529 * @object: A #FooiGenBar.
1530 * @invocation: A #GDBusMethodInvocation.
1531 * @arg_val_byte: Argument passed by remote caller.
1532 * @arg_val_boolean: Argument passed by remote caller.
1533 * @arg_val_int16: Argument passed by remote caller.
1534 * @arg_val_uint16: Argument passed by remote caller.
1535 * @arg_val_int32: Argument passed by remote caller.
1536 * @arg_val_uint32: Argument passed by remote caller.
1537 * @arg_val_int64: Argument passed by remote caller.
1538 * @arg_val_uint64: Argument passed by remote caller.
1539 * @arg_val_double: Argument passed by remote caller.
1540 * @arg_val_string: Argument passed by remote caller.
1541 * @arg_val_objpath: Argument passed by remote caller.
1542 * @arg_val_signature: Argument passed by remote caller.
1543 * @arg_val_bytestring: Argument passed by remote caller.
1545 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.TestPrimitiveTypes">TestPrimitiveTypes()</link> D-Bus method.
1547 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_test_primitive_types() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1549 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1551 g_signal_new ("handle-test-primitive-types",
1552 G_TYPE_FROM_INTERFACE (iface),
1554 G_STRUCT_OFFSET (FooiGenBarIface, handle_test_primitive_types),
1555 g_signal_accumulator_true_handled,
1557 g_cclosure_marshal_generic,
1560 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, G_TYPE_STRING);
1563 * FooiGenBar::handle-test-non-primitive-types:
1564 * @object: A #FooiGenBar.
1565 * @invocation: A #GDBusMethodInvocation.
1566 * @arg_dict_s_to_s: Argument passed by remote caller.
1567 * @arg_dict_s_to_pairs: Argument passed by remote caller.
1568 * @arg_a_struct: Argument passed by remote caller.
1569 * @arg_array_of_strings: Argument passed by remote caller.
1570 * @arg_array_of_objpaths: Argument passed by remote caller.
1571 * @arg_array_of_signatures: Argument passed by remote caller.
1572 * @arg_array_of_bytestrings: Argument passed by remote caller.
1574 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.TestNonPrimitiveTypes">TestNonPrimitiveTypes()</link> D-Bus method.
1576 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_test_non_primitive_types() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1578 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1580 g_signal_new ("handle-test-non-primitive-types",
1581 G_TYPE_FROM_INTERFACE (iface),
1583 G_STRUCT_OFFSET (FooiGenBarIface, handle_test_non_primitive_types),
1584 g_signal_accumulator_true_handled,
1586 g_cclosure_marshal_generic,
1589 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_VARIANT, G_TYPE_STRV);
1592 * FooiGenBar::handle-request-signal-emission:
1593 * @object: A #FooiGenBar.
1594 * @invocation: A #GDBusMethodInvocation.
1595 * @arg_which_one: Argument passed by remote caller.
1597 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.RequestSignalEmission">RequestSignalEmission()</link> D-Bus method.
1599 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_request_signal_emission() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1601 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1603 g_signal_new ("handle-request-signal-emission",
1604 G_TYPE_FROM_INTERFACE (iface),
1606 G_STRUCT_OFFSET (FooiGenBarIface, handle_request_signal_emission),
1607 g_signal_accumulator_true_handled,
1609 g_cclosure_marshal_generic,
1612 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
1615 * FooiGenBar::handle-request-multi-property-mods:
1616 * @object: A #FooiGenBar.
1617 * @invocation: A #GDBusMethodInvocation.
1619 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.RequestMultiPropertyMods">RequestMultiPropertyMods()</link> D-Bus method.
1621 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_request_multi_property_mods() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1623 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1625 g_signal_new ("handle-request-multi-property-mods",
1626 G_TYPE_FROM_INTERFACE (iface),
1628 G_STRUCT_OFFSET (FooiGenBarIface, handle_request_multi_property_mods),
1629 g_signal_accumulator_true_handled,
1631 g_cclosure_marshal_generic,
1634 G_TYPE_DBUS_METHOD_INVOCATION);
1637 * FooiGenBar::handle-unimplemented-method:
1638 * @object: A #FooiGenBar.
1639 * @invocation: A #GDBusMethodInvocation.
1641 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.UnimplementedMethod">UnimplementedMethod()</link> D-Bus method.
1643 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_unimplemented_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1645 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1647 g_signal_new ("handle-unimplemented-method",
1648 G_TYPE_FROM_INTERFACE (iface),
1650 G_STRUCT_OFFSET (FooiGenBarIface, handle_unimplemented_method),
1651 g_signal_accumulator_true_handled,
1653 g_cclosure_marshal_generic,
1656 G_TYPE_DBUS_METHOD_INVOCATION);
1659 * FooiGenBar::handle-property-cancellation:
1660 * @object: A #FooiGenBar.
1661 * @invocation: A #GDBusMethodInvocation.
1663 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar.PropertyCancellation">PropertyCancellation()</link> D-Bus method.
1665 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_complete_property_cancellation() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
1667 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
1669 g_signal_new ("handle-property-cancellation",
1670 G_TYPE_FROM_INTERFACE (iface),
1672 G_STRUCT_OFFSET (FooiGenBarIface, handle_property_cancellation),
1673 g_signal_accumulator_true_handled,
1675 g_cclosure_marshal_generic,
1678 G_TYPE_DBUS_METHOD_INVOCATION);
1680 /* GObject signals for received D-Bus signals: */
1682 * FooiGenBar::test-signal:
1683 * @object: A #FooiGenBar.
1684 * @arg_val_int32: Argument.
1685 * @arg_array_of_strings: Argument.
1686 * @arg_array_of_bytestrings: Argument.
1687 * @arg_dict_s_to_pairs: Argument.
1689 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-project-Bar.TestSignal">"TestSignal"</link> is received.
1691 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
1693 g_signal_new ("test-signal",
1694 G_TYPE_FROM_INTERFACE (iface),
1696 G_STRUCT_OFFSET (FooiGenBarIface, test_signal),
1699 g_cclosure_marshal_generic,
1701 4, G_TYPE_INT, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_VARIANT);
1704 * FooiGenBar::another-signal:
1705 * @object: A #FooiGenBar.
1706 * @arg_word: Argument.
1708 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-project-Bar.AnotherSignal">"AnotherSignal"</link> is received.
1710 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
1712 g_signal_new ("another-signal",
1713 G_TYPE_FROM_INTERFACE (iface),
1715 G_STRUCT_OFFSET (FooiGenBarIface, another_signal),
1718 g_cclosure_marshal_generic,
1722 /* GObject properties for D-Bus properties: */
1726 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.y">"y"</link>.
1728 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1730 g_object_interface_install_property (iface,
1731 g_param_spec_uchar ("y", "y", "y", 0, 255, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1735 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.b">"b"</link>.
1737 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1739 g_object_interface_install_property (iface,
1740 g_param_spec_boolean ("b", "b", "b", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1744 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.n">"n"</link>.
1746 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1748 g_object_interface_install_property (iface,
1749 g_param_spec_int ("n", "n", "n", G_MININT16, G_MAXINT16, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1753 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.q">"q"</link>.
1755 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1757 g_object_interface_install_property (iface,
1758 g_param_spec_uint ("q", "q", "q", 0, G_MAXUINT16, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1762 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.i">"i"</link>.
1764 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1766 g_object_interface_install_property (iface,
1767 g_param_spec_int ("i", "i", "i", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1771 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.u">"u"</link>.
1773 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1775 g_object_interface_install_property (iface,
1776 g_param_spec_uint ("u", "u", "u", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1780 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.x">"x"</link>.
1782 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1784 g_object_interface_install_property (iface,
1785 g_param_spec_int64 ("x", "x", "x", G_MININT64, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1789 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.t">"t"</link>.
1791 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1793 g_object_interface_install_property (iface,
1794 g_param_spec_uint64 ("t", "t", "t", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1798 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.d">"d"</link>.
1800 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1802 g_object_interface_install_property (iface,
1803 g_param_spec_double ("d", "d", "d", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1807 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.s">"s"</link>.
1809 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1811 g_object_interface_install_property (iface,
1812 g_param_spec_string ("s", "s", "s", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1816 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.o">"o"</link>.
1818 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1820 g_object_interface_install_property (iface,
1821 g_param_spec_string ("o", "o", "o", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1825 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.g">"g"</link>.
1827 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1829 g_object_interface_install_property (iface,
1830 g_param_spec_string ("g", "g", "g", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1834 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.ay">"ay"</link>.
1836 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1838 g_object_interface_install_property (iface,
1839 g_param_spec_string ("ay", "ay", "ay", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1843 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.as">"as"</link>.
1845 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1847 g_object_interface_install_property (iface,
1848 g_param_spec_boxed ("as", "as", "as", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1852 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.aay">"aay"</link>.
1854 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1856 g_object_interface_install_property (iface,
1857 g_param_spec_boxed ("aay", "aay", "aay", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1861 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.ao">"ao"</link>.
1863 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1865 g_object_interface_install_property (iface,
1866 g_param_spec_boxed ("ao", "ao", "ao", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1870 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.ag">"ag"</link>.
1872 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1874 g_object_interface_install_property (iface,
1875 g_param_spec_variant ("ag", "ag", "ag", G_VARIANT_TYPE ("ag"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1877 * FooiGenBar:finally-normal-name:
1879 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.FinallyNormalName">"FinallyNormalName"</link>.
1881 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1883 g_object_interface_install_property (iface,
1884 g_param_spec_string ("finally-normal-name", "FinallyNormalName", "FinallyNormalName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1886 * FooiGenBar:readonly-property:
1888 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.ReadonlyProperty">"ReadonlyProperty"</link>.
1890 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
1892 g_object_interface_install_property (iface,
1893 g_param_spec_string ("readonly-property", "ReadonlyProperty", "ReadonlyProperty", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1895 * FooiGenBar:writeonly-property:
1897 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.WriteonlyProperty">"WriteonlyProperty"</link>.
1899 * Since the D-Bus property for this #GObject property is writable but not readable, it is meaningful to write to it on both the client- and service-side. It is only meaningful, however, to read from it on the service-side.
1901 g_object_interface_install_property (iface,
1902 g_param_spec_string ("writeonly-property", "WriteonlyProperty", "WriteonlyProperty", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1904 * FooiGenBar:unset-i:
1906 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_i">"unset_i"</link>.
1908 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1910 g_object_interface_install_property (iface,
1911 g_param_spec_int ("unset-i", "unset_i", "unset_i", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1913 * FooiGenBar:unset-d:
1915 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_d">"unset_d"</link>.
1917 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1919 g_object_interface_install_property (iface,
1920 g_param_spec_double ("unset-d", "unset_d", "unset_d", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1922 * FooiGenBar:unset-s:
1924 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_s">"unset_s"</link>.
1926 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1928 g_object_interface_install_property (iface,
1929 g_param_spec_string ("unset-s", "unset_s", "unset_s", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1931 * FooiGenBar:unset-o:
1933 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_o">"unset_o"</link>.
1935 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1937 g_object_interface_install_property (iface,
1938 g_param_spec_string ("unset-o", "unset_o", "unset_o", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1940 * FooiGenBar:unset-g:
1942 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_g">"unset_g"</link>.
1944 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1946 g_object_interface_install_property (iface,
1947 g_param_spec_string ("unset-g", "unset_g", "unset_g", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1949 * FooiGenBar:unset-ay:
1951 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_ay">"unset_ay"</link>.
1953 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1955 g_object_interface_install_property (iface,
1956 g_param_spec_string ("unset-ay", "unset_ay", "unset_ay", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1958 * FooiGenBar:unset-as:
1960 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_as">"unset_as"</link>.
1962 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1964 g_object_interface_install_property (iface,
1965 g_param_spec_boxed ("unset-as", "unset_as", "unset_as", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1967 * FooiGenBar:unset-ao:
1969 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_ao">"unset_ao"</link>.
1971 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1973 g_object_interface_install_property (iface,
1974 g_param_spec_boxed ("unset-ao", "unset_ao", "unset_ao", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1976 * FooiGenBar:unset-ag:
1978 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_ag">"unset_ag"</link>.
1980 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1982 g_object_interface_install_property (iface,
1983 g_param_spec_variant ("unset-ag", "unset_ag", "unset_ag", G_VARIANT_TYPE ("ag"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1985 * FooiGenBar:unset-struct:
1987 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bar.unset_struct">"unset_struct"</link>.
1989 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
1991 g_object_interface_install_property (iface,
1992 g_param_spec_variant ("unset-struct", "unset_struct", "unset_struct", G_VARIANT_TYPE ("(idsogayasaoag)"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
1995 typedef FooiGenBarIface FooiGenBarInterface;
1996 G_DEFINE_INTERFACE (FooiGenBar, foo_igen_bar, G_TYPE_OBJECT);
1999 * foo_igen_bar_get_y: (skip)
2000 * @object: A #FooiGenBar.
2002 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.y">"y"</link> D-Bus property.
2004 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2006 * Returns: The property value.
2009 foo_igen_bar_get_y (FooiGenBar *object)
2011 return FOO_IGEN_BAR_GET_IFACE (object)->get_y (object);
2015 * foo_igen_bar_set_y: (skip)
2016 * @object: A #FooiGenBar.
2017 * @value: The value to set.
2019 * Sets the <link linkend="gdbus-property-org-project-Bar.y">"y"</link> D-Bus property to @value.
2021 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2024 foo_igen_bar_set_y (FooiGenBar *object, guchar value)
2026 g_object_set (G_OBJECT (object), "y", value, NULL);
2030 * foo_igen_bar_get_b: (skip)
2031 * @object: A #FooiGenBar.
2033 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.b">"b"</link> D-Bus property.
2035 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2037 * Returns: The property value.
2040 foo_igen_bar_get_b (FooiGenBar *object)
2042 return FOO_IGEN_BAR_GET_IFACE (object)->get_b (object);
2046 * foo_igen_bar_set_b: (skip)
2047 * @object: A #FooiGenBar.
2048 * @value: The value to set.
2050 * Sets the <link linkend="gdbus-property-org-project-Bar.b">"b"</link> D-Bus property to @value.
2052 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2055 foo_igen_bar_set_b (FooiGenBar *object, gboolean value)
2057 g_object_set (G_OBJECT (object), "b", value, NULL);
2061 * foo_igen_bar_get_n: (skip)
2062 * @object: A #FooiGenBar.
2064 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.n">"n"</link> D-Bus property.
2066 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2068 * Returns: The property value.
2071 foo_igen_bar_get_n (FooiGenBar *object)
2073 return FOO_IGEN_BAR_GET_IFACE (object)->get_n (object);
2077 * foo_igen_bar_set_n: (skip)
2078 * @object: A #FooiGenBar.
2079 * @value: The value to set.
2081 * Sets the <link linkend="gdbus-property-org-project-Bar.n">"n"</link> D-Bus property to @value.
2083 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2086 foo_igen_bar_set_n (FooiGenBar *object, gint16 value)
2088 g_object_set (G_OBJECT (object), "n", value, NULL);
2092 * foo_igen_bar_get_q: (skip)
2093 * @object: A #FooiGenBar.
2095 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.q">"q"</link> D-Bus property.
2097 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2099 * Returns: The property value.
2102 foo_igen_bar_get_q (FooiGenBar *object)
2104 return FOO_IGEN_BAR_GET_IFACE (object)->get_q (object);
2108 * foo_igen_bar_set_q: (skip)
2109 * @object: A #FooiGenBar.
2110 * @value: The value to set.
2112 * Sets the <link linkend="gdbus-property-org-project-Bar.q">"q"</link> D-Bus property to @value.
2114 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2117 foo_igen_bar_set_q (FooiGenBar *object, guint16 value)
2119 g_object_set (G_OBJECT (object), "q", value, NULL);
2123 * foo_igen_bar_get_i: (skip)
2124 * @object: A #FooiGenBar.
2126 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.i">"i"</link> D-Bus property.
2128 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2130 * Returns: The property value.
2133 foo_igen_bar_get_i (FooiGenBar *object)
2135 return FOO_IGEN_BAR_GET_IFACE (object)->get_i (object);
2139 * foo_igen_bar_set_i: (skip)
2140 * @object: A #FooiGenBar.
2141 * @value: The value to set.
2143 * Sets the <link linkend="gdbus-property-org-project-Bar.i">"i"</link> D-Bus property to @value.
2145 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2148 foo_igen_bar_set_i (FooiGenBar *object, gint value)
2150 g_object_set (G_OBJECT (object), "i", value, NULL);
2154 * foo_igen_bar_get_u: (skip)
2155 * @object: A #FooiGenBar.
2157 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.u">"u"</link> D-Bus property.
2159 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2161 * Returns: The property value.
2164 foo_igen_bar_get_u (FooiGenBar *object)
2166 return FOO_IGEN_BAR_GET_IFACE (object)->get_u (object);
2170 * foo_igen_bar_set_u: (skip)
2171 * @object: A #FooiGenBar.
2172 * @value: The value to set.
2174 * Sets the <link linkend="gdbus-property-org-project-Bar.u">"u"</link> D-Bus property to @value.
2176 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2179 foo_igen_bar_set_u (FooiGenBar *object, guint value)
2181 g_object_set (G_OBJECT (object), "u", value, NULL);
2185 * foo_igen_bar_get_x: (skip)
2186 * @object: A #FooiGenBar.
2188 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.x">"x"</link> D-Bus property.
2190 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2192 * Returns: The property value.
2195 foo_igen_bar_get_x (FooiGenBar *object)
2197 return FOO_IGEN_BAR_GET_IFACE (object)->get_x (object);
2201 * foo_igen_bar_set_x: (skip)
2202 * @object: A #FooiGenBar.
2203 * @value: The value to set.
2205 * Sets the <link linkend="gdbus-property-org-project-Bar.x">"x"</link> D-Bus property to @value.
2207 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2210 foo_igen_bar_set_x (FooiGenBar *object, gint64 value)
2212 g_object_set (G_OBJECT (object), "x", value, NULL);
2216 * foo_igen_bar_get_t: (skip)
2217 * @object: A #FooiGenBar.
2219 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.t">"t"</link> D-Bus property.
2221 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2223 * Returns: The property value.
2226 foo_igen_bar_get_t (FooiGenBar *object)
2228 return FOO_IGEN_BAR_GET_IFACE (object)->get_t (object);
2232 * foo_igen_bar_set_t: (skip)
2233 * @object: A #FooiGenBar.
2234 * @value: The value to set.
2236 * Sets the <link linkend="gdbus-property-org-project-Bar.t">"t"</link> D-Bus property to @value.
2238 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2241 foo_igen_bar_set_t (FooiGenBar *object, guint64 value)
2243 g_object_set (G_OBJECT (object), "t", value, NULL);
2247 * foo_igen_bar_get_d: (skip)
2248 * @object: A #FooiGenBar.
2250 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.d">"d"</link> D-Bus property.
2252 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2254 * Returns: The property value.
2257 foo_igen_bar_get_d (FooiGenBar *object)
2259 return FOO_IGEN_BAR_GET_IFACE (object)->get_d (object);
2263 * foo_igen_bar_set_d: (skip)
2264 * @object: A #FooiGenBar.
2265 * @value: The value to set.
2267 * Sets the <link linkend="gdbus-property-org-project-Bar.d">"d"</link> D-Bus property to @value.
2269 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2272 foo_igen_bar_set_d (FooiGenBar *object, gdouble value)
2274 g_object_set (G_OBJECT (object), "d", value, NULL);
2278 * foo_igen_bar_get_s: (skip)
2279 * @object: A #FooiGenBar.
2281 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.s">"s"</link> D-Bus property.
2283 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2285 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_s() if on another thread.</warning>
2287 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2290 foo_igen_bar_get_s (FooiGenBar *object)
2292 return FOO_IGEN_BAR_GET_IFACE (object)->get_s (object);
2296 * foo_igen_bar_dup_s: (skip)
2297 * @object: A #FooiGenBar.
2299 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.s">"s"</link> D-Bus property.
2301 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2303 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2306 foo_igen_bar_dup_s (FooiGenBar *object)
2309 g_object_get (G_OBJECT (object), "s", &value, NULL);
2314 * foo_igen_bar_set_s: (skip)
2315 * @object: A #FooiGenBar.
2316 * @value: The value to set.
2318 * Sets the <link linkend="gdbus-property-org-project-Bar.s">"s"</link> D-Bus property to @value.
2320 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2323 foo_igen_bar_set_s (FooiGenBar *object, const gchar *value)
2325 g_object_set (G_OBJECT (object), "s", value, NULL);
2329 * foo_igen_bar_get_o: (skip)
2330 * @object: A #FooiGenBar.
2332 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.o">"o"</link> D-Bus property.
2334 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2336 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_o() if on another thread.</warning>
2338 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2341 foo_igen_bar_get_o (FooiGenBar *object)
2343 return FOO_IGEN_BAR_GET_IFACE (object)->get_o (object);
2347 * foo_igen_bar_dup_o: (skip)
2348 * @object: A #FooiGenBar.
2350 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.o">"o"</link> D-Bus property.
2352 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2354 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2357 foo_igen_bar_dup_o (FooiGenBar *object)
2360 g_object_get (G_OBJECT (object), "o", &value, NULL);
2365 * foo_igen_bar_set_o: (skip)
2366 * @object: A #FooiGenBar.
2367 * @value: The value to set.
2369 * Sets the <link linkend="gdbus-property-org-project-Bar.o">"o"</link> D-Bus property to @value.
2371 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2374 foo_igen_bar_set_o (FooiGenBar *object, const gchar *value)
2376 g_object_set (G_OBJECT (object), "o", value, NULL);
2380 * foo_igen_bar_get_g: (skip)
2381 * @object: A #FooiGenBar.
2383 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.g">"g"</link> D-Bus property.
2385 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2387 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_g() if on another thread.</warning>
2389 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2392 foo_igen_bar_get_g (FooiGenBar *object)
2394 return FOO_IGEN_BAR_GET_IFACE (object)->get_g (object);
2398 * foo_igen_bar_dup_g: (skip)
2399 * @object: A #FooiGenBar.
2401 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.g">"g"</link> D-Bus property.
2403 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2405 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2408 foo_igen_bar_dup_g (FooiGenBar *object)
2411 g_object_get (G_OBJECT (object), "g", &value, NULL);
2416 * foo_igen_bar_set_g: (skip)
2417 * @object: A #FooiGenBar.
2418 * @value: The value to set.
2420 * Sets the <link linkend="gdbus-property-org-project-Bar.g">"g"</link> D-Bus property to @value.
2422 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2425 foo_igen_bar_set_g (FooiGenBar *object, const gchar *value)
2427 g_object_set (G_OBJECT (object), "g", value, NULL);
2431 * foo_igen_bar_get_ay: (skip)
2432 * @object: A #FooiGenBar.
2434 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.ay">"ay"</link> D-Bus property.
2436 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2438 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_ay() if on another thread.</warning>
2440 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2443 foo_igen_bar_get_ay (FooiGenBar *object)
2445 return FOO_IGEN_BAR_GET_IFACE (object)->get_ay (object);
2449 * foo_igen_bar_dup_ay: (skip)
2450 * @object: A #FooiGenBar.
2452 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.ay">"ay"</link> D-Bus property.
2454 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2456 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2459 foo_igen_bar_dup_ay (FooiGenBar *object)
2462 g_object_get (G_OBJECT (object), "ay", &value, NULL);
2467 * foo_igen_bar_set_ay: (skip)
2468 * @object: A #FooiGenBar.
2469 * @value: The value to set.
2471 * Sets the <link linkend="gdbus-property-org-project-Bar.ay">"ay"</link> D-Bus property to @value.
2473 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2476 foo_igen_bar_set_ay (FooiGenBar *object, const gchar *value)
2478 g_object_set (G_OBJECT (object), "ay", value, NULL);
2482 * foo_igen_bar_get_as: (skip)
2483 * @object: A #FooiGenBar.
2485 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.as">"as"</link> D-Bus property.
2487 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2489 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_as() if on another thread.</warning>
2491 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2493 const gchar *const *
2494 foo_igen_bar_get_as (FooiGenBar *object)
2496 return FOO_IGEN_BAR_GET_IFACE (object)->get_as (object);
2500 * foo_igen_bar_dup_as: (skip)
2501 * @object: A #FooiGenBar.
2503 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.as">"as"</link> D-Bus property.
2505 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2507 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
2510 foo_igen_bar_dup_as (FooiGenBar *object)
2513 g_object_get (G_OBJECT (object), "as", &value, NULL);
2518 * foo_igen_bar_set_as: (skip)
2519 * @object: A #FooiGenBar.
2520 * @value: The value to set.
2522 * Sets the <link linkend="gdbus-property-org-project-Bar.as">"as"</link> D-Bus property to @value.
2524 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2527 foo_igen_bar_set_as (FooiGenBar *object, const gchar *const *value)
2529 g_object_set (G_OBJECT (object), "as", value, NULL);
2533 * foo_igen_bar_get_aay: (skip)
2534 * @object: A #FooiGenBar.
2536 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.aay">"aay"</link> D-Bus property.
2538 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2540 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_aay() if on another thread.</warning>
2542 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2544 const gchar *const *
2545 foo_igen_bar_get_aay (FooiGenBar *object)
2547 return FOO_IGEN_BAR_GET_IFACE (object)->get_aay (object);
2551 * foo_igen_bar_dup_aay: (skip)
2552 * @object: A #FooiGenBar.
2554 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.aay">"aay"</link> D-Bus property.
2556 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2558 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
2561 foo_igen_bar_dup_aay (FooiGenBar *object)
2564 g_object_get (G_OBJECT (object), "aay", &value, NULL);
2569 * foo_igen_bar_set_aay: (skip)
2570 * @object: A #FooiGenBar.
2571 * @value: The value to set.
2573 * Sets the <link linkend="gdbus-property-org-project-Bar.aay">"aay"</link> D-Bus property to @value.
2575 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2578 foo_igen_bar_set_aay (FooiGenBar *object, const gchar *const *value)
2580 g_object_set (G_OBJECT (object), "aay", value, NULL);
2584 * foo_igen_bar_get_ao: (skip)
2585 * @object: A #FooiGenBar.
2587 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.ao">"ao"</link> D-Bus property.
2589 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2591 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_ao() if on another thread.</warning>
2593 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2595 const gchar *const *
2596 foo_igen_bar_get_ao (FooiGenBar *object)
2598 return FOO_IGEN_BAR_GET_IFACE (object)->get_ao (object);
2602 * foo_igen_bar_dup_ao: (skip)
2603 * @object: A #FooiGenBar.
2605 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.ao">"ao"</link> D-Bus property.
2607 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2609 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
2612 foo_igen_bar_dup_ao (FooiGenBar *object)
2615 g_object_get (G_OBJECT (object), "ao", &value, NULL);
2620 * foo_igen_bar_set_ao: (skip)
2621 * @object: A #FooiGenBar.
2622 * @value: The value to set.
2624 * Sets the <link linkend="gdbus-property-org-project-Bar.ao">"ao"</link> D-Bus property to @value.
2626 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2629 foo_igen_bar_set_ao (FooiGenBar *object, const gchar *const *value)
2631 g_object_set (G_OBJECT (object), "ao", value, NULL);
2635 * foo_igen_bar_get_ag: (skip)
2636 * @object: A #FooiGenBar.
2638 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.ag">"ag"</link> D-Bus property.
2640 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2642 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_ag() if on another thread.</warning>
2644 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2647 foo_igen_bar_get_ag (FooiGenBar *object)
2649 return FOO_IGEN_BAR_GET_IFACE (object)->get_ag (object);
2653 * foo_igen_bar_dup_ag: (skip)
2654 * @object: A #FooiGenBar.
2656 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.ag">"ag"</link> D-Bus property.
2658 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2660 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
2663 foo_igen_bar_dup_ag (FooiGenBar *object)
2666 g_object_get (G_OBJECT (object), "ag", &value, NULL);
2671 * foo_igen_bar_set_ag: (skip)
2672 * @object: A #FooiGenBar.
2673 * @value: The value to set.
2675 * Sets the <link linkend="gdbus-property-org-project-Bar.ag">"ag"</link> D-Bus property to @value.
2677 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2680 foo_igen_bar_set_ag (FooiGenBar *object, GVariant *value)
2682 g_object_set (G_OBJECT (object), "ag", value, NULL);
2686 * foo_igen_bar_get_finally_normal_name: (skip)
2687 * @object: A #FooiGenBar.
2689 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.FinallyNormalName">"FinallyNormalName"</link> D-Bus property.
2691 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2693 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_finally_normal_name() if on another thread.</warning>
2695 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2698 foo_igen_bar_get_finally_normal_name (FooiGenBar *object)
2700 return FOO_IGEN_BAR_GET_IFACE (object)->get_finally_normal_name (object);
2704 * foo_igen_bar_dup_finally_normal_name: (skip)
2705 * @object: A #FooiGenBar.
2707 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.FinallyNormalName">"FinallyNormalName"</link> D-Bus property.
2709 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2711 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2714 foo_igen_bar_dup_finally_normal_name (FooiGenBar *object)
2717 g_object_get (G_OBJECT (object), "finally-normal-name", &value, NULL);
2722 * foo_igen_bar_set_finally_normal_name: (skip)
2723 * @object: A #FooiGenBar.
2724 * @value: The value to set.
2726 * Sets the <link linkend="gdbus-property-org-project-Bar.FinallyNormalName">"FinallyNormalName"</link> D-Bus property to @value.
2728 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2731 foo_igen_bar_set_finally_normal_name (FooiGenBar *object, const gchar *value)
2733 g_object_set (G_OBJECT (object), "finally-normal-name", value, NULL);
2737 * foo_igen_bar_get_readonly_property: (skip)
2738 * @object: A #FooiGenBar.
2740 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.ReadonlyProperty">"ReadonlyProperty"</link> D-Bus property.
2742 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
2744 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_readonly_property() if on another thread.</warning>
2746 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2749 foo_igen_bar_get_readonly_property (FooiGenBar *object)
2751 return FOO_IGEN_BAR_GET_IFACE (object)->get_readonly_property (object);
2755 * foo_igen_bar_dup_readonly_property: (skip)
2756 * @object: A #FooiGenBar.
2758 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.ReadonlyProperty">"ReadonlyProperty"</link> D-Bus property.
2760 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
2762 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2765 foo_igen_bar_dup_readonly_property (FooiGenBar *object)
2768 g_object_get (G_OBJECT (object), "readonly-property", &value, NULL);
2773 * foo_igen_bar_set_readonly_property: (skip)
2774 * @object: A #FooiGenBar.
2775 * @value: The value to set.
2777 * Sets the <link linkend="gdbus-property-org-project-Bar.ReadonlyProperty">"ReadonlyProperty"</link> D-Bus property to @value.
2779 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
2782 foo_igen_bar_set_readonly_property (FooiGenBar *object, const gchar *value)
2784 g_object_set (G_OBJECT (object), "readonly-property", value, NULL);
2788 * foo_igen_bar_get_writeonly_property: (skip)
2789 * @object: A #FooiGenBar.
2791 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.WriteonlyProperty">"WriteonlyProperty"</link> D-Bus property.
2793 * Since this D-Bus property is not readable, it is only meaningful to use this function on the service-side.
2795 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_writeonly_property() if on another thread.</warning>
2797 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2800 foo_igen_bar_get_writeonly_property (FooiGenBar *object)
2802 return FOO_IGEN_BAR_GET_IFACE (object)->get_writeonly_property (object);
2806 * foo_igen_bar_dup_writeonly_property: (skip)
2807 * @object: A #FooiGenBar.
2809 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.WriteonlyProperty">"WriteonlyProperty"</link> D-Bus property.
2811 * Since this D-Bus property is not readable, it is only meaningful to use this function on the service-side.
2813 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2816 foo_igen_bar_dup_writeonly_property (FooiGenBar *object)
2819 g_object_get (G_OBJECT (object), "writeonly-property", &value, NULL);
2824 * foo_igen_bar_set_writeonly_property: (skip)
2825 * @object: A #FooiGenBar.
2826 * @value: The value to set.
2828 * Sets the <link linkend="gdbus-property-org-project-Bar.WriteonlyProperty">"WriteonlyProperty"</link> D-Bus property to @value.
2830 * Since this D-Bus property is writable, it is meaningful to use this function on both the client- and service-side.
2833 foo_igen_bar_set_writeonly_property (FooiGenBar *object, const gchar *value)
2835 g_object_set (G_OBJECT (object), "writeonly-property", value, NULL);
2839 * foo_igen_bar_get_unset_i: (skip)
2840 * @object: A #FooiGenBar.
2842 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_i">"unset_i"</link> D-Bus property.
2844 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2846 * Returns: The property value.
2849 foo_igen_bar_get_unset_i (FooiGenBar *object)
2851 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_i (object);
2855 * foo_igen_bar_set_unset_i: (skip)
2856 * @object: A #FooiGenBar.
2857 * @value: The value to set.
2859 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_i">"unset_i"</link> D-Bus property to @value.
2861 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2864 foo_igen_bar_set_unset_i (FooiGenBar *object, gint value)
2866 g_object_set (G_OBJECT (object), "unset-i", value, NULL);
2870 * foo_igen_bar_get_unset_d: (skip)
2871 * @object: A #FooiGenBar.
2873 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_d">"unset_d"</link> D-Bus property.
2875 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2877 * Returns: The property value.
2880 foo_igen_bar_get_unset_d (FooiGenBar *object)
2882 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_d (object);
2886 * foo_igen_bar_set_unset_d: (skip)
2887 * @object: A #FooiGenBar.
2888 * @value: The value to set.
2890 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_d">"unset_d"</link> D-Bus property to @value.
2892 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2895 foo_igen_bar_set_unset_d (FooiGenBar *object, gdouble value)
2897 g_object_set (G_OBJECT (object), "unset-d", value, NULL);
2901 * foo_igen_bar_get_unset_s: (skip)
2902 * @object: A #FooiGenBar.
2904 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_s">"unset_s"</link> D-Bus property.
2906 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2908 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_s() if on another thread.</warning>
2910 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2913 foo_igen_bar_get_unset_s (FooiGenBar *object)
2915 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_s (object);
2919 * foo_igen_bar_dup_unset_s: (skip)
2920 * @object: A #FooiGenBar.
2922 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_s">"unset_s"</link> D-Bus property.
2924 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2926 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2929 foo_igen_bar_dup_unset_s (FooiGenBar *object)
2932 g_object_get (G_OBJECT (object), "unset-s", &value, NULL);
2937 * foo_igen_bar_set_unset_s: (skip)
2938 * @object: A #FooiGenBar.
2939 * @value: The value to set.
2941 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_s">"unset_s"</link> D-Bus property to @value.
2943 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2946 foo_igen_bar_set_unset_s (FooiGenBar *object, const gchar *value)
2948 g_object_set (G_OBJECT (object), "unset-s", value, NULL);
2952 * foo_igen_bar_get_unset_o: (skip)
2953 * @object: A #FooiGenBar.
2955 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_o">"unset_o"</link> D-Bus property.
2957 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2959 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_o() if on another thread.</warning>
2961 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
2964 foo_igen_bar_get_unset_o (FooiGenBar *object)
2966 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_o (object);
2970 * foo_igen_bar_dup_unset_o: (skip)
2971 * @object: A #FooiGenBar.
2973 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_o">"unset_o"</link> D-Bus property.
2975 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2977 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
2980 foo_igen_bar_dup_unset_o (FooiGenBar *object)
2983 g_object_get (G_OBJECT (object), "unset-o", &value, NULL);
2988 * foo_igen_bar_set_unset_o: (skip)
2989 * @object: A #FooiGenBar.
2990 * @value: The value to set.
2992 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_o">"unset_o"</link> D-Bus property to @value.
2994 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
2997 foo_igen_bar_set_unset_o (FooiGenBar *object, const gchar *value)
2999 g_object_set (G_OBJECT (object), "unset-o", value, NULL);
3003 * foo_igen_bar_get_unset_g: (skip)
3004 * @object: A #FooiGenBar.
3006 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_g">"unset_g"</link> D-Bus property.
3008 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3010 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_g() if on another thread.</warning>
3012 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
3015 foo_igen_bar_get_unset_g (FooiGenBar *object)
3017 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_g (object);
3021 * foo_igen_bar_dup_unset_g: (skip)
3022 * @object: A #FooiGenBar.
3024 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_g">"unset_g"</link> D-Bus property.
3026 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3028 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
3031 foo_igen_bar_dup_unset_g (FooiGenBar *object)
3034 g_object_get (G_OBJECT (object), "unset-g", &value, NULL);
3039 * foo_igen_bar_set_unset_g: (skip)
3040 * @object: A #FooiGenBar.
3041 * @value: The value to set.
3043 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_g">"unset_g"</link> D-Bus property to @value.
3045 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3048 foo_igen_bar_set_unset_g (FooiGenBar *object, const gchar *value)
3050 g_object_set (G_OBJECT (object), "unset-g", value, NULL);
3054 * foo_igen_bar_get_unset_ay: (skip)
3055 * @object: A #FooiGenBar.
3057 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_ay">"unset_ay"</link> D-Bus property.
3059 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3061 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_ay() if on another thread.</warning>
3063 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
3066 foo_igen_bar_get_unset_ay (FooiGenBar *object)
3068 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_ay (object);
3072 * foo_igen_bar_dup_unset_ay: (skip)
3073 * @object: A #FooiGenBar.
3075 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_ay">"unset_ay"</link> D-Bus property.
3077 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3079 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
3082 foo_igen_bar_dup_unset_ay (FooiGenBar *object)
3085 g_object_get (G_OBJECT (object), "unset-ay", &value, NULL);
3090 * foo_igen_bar_set_unset_ay: (skip)
3091 * @object: A #FooiGenBar.
3092 * @value: The value to set.
3094 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_ay">"unset_ay"</link> D-Bus property to @value.
3096 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3099 foo_igen_bar_set_unset_ay (FooiGenBar *object, const gchar *value)
3101 g_object_set (G_OBJECT (object), "unset-ay", value, NULL);
3105 * foo_igen_bar_get_unset_as: (skip)
3106 * @object: A #FooiGenBar.
3108 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_as">"unset_as"</link> D-Bus property.
3110 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3112 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_as() if on another thread.</warning>
3114 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
3116 const gchar *const *
3117 foo_igen_bar_get_unset_as (FooiGenBar *object)
3119 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_as (object);
3123 * foo_igen_bar_dup_unset_as: (skip)
3124 * @object: A #FooiGenBar.
3126 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_as">"unset_as"</link> D-Bus property.
3128 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3130 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
3133 foo_igen_bar_dup_unset_as (FooiGenBar *object)
3136 g_object_get (G_OBJECT (object), "unset-as", &value, NULL);
3141 * foo_igen_bar_set_unset_as: (skip)
3142 * @object: A #FooiGenBar.
3143 * @value: The value to set.
3145 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_as">"unset_as"</link> D-Bus property to @value.
3147 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3150 foo_igen_bar_set_unset_as (FooiGenBar *object, const gchar *const *value)
3152 g_object_set (G_OBJECT (object), "unset-as", value, NULL);
3156 * foo_igen_bar_get_unset_ao: (skip)
3157 * @object: A #FooiGenBar.
3159 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_ao">"unset_ao"</link> D-Bus property.
3161 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3163 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_ao() if on another thread.</warning>
3165 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
3167 const gchar *const *
3168 foo_igen_bar_get_unset_ao (FooiGenBar *object)
3170 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_ao (object);
3174 * foo_igen_bar_dup_unset_ao: (skip)
3175 * @object: A #FooiGenBar.
3177 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_ao">"unset_ao"</link> D-Bus property.
3179 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3181 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
3184 foo_igen_bar_dup_unset_ao (FooiGenBar *object)
3187 g_object_get (G_OBJECT (object), "unset-ao", &value, NULL);
3192 * foo_igen_bar_set_unset_ao: (skip)
3193 * @object: A #FooiGenBar.
3194 * @value: The value to set.
3196 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_ao">"unset_ao"</link> D-Bus property to @value.
3198 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3201 foo_igen_bar_set_unset_ao (FooiGenBar *object, const gchar *const *value)
3203 g_object_set (G_OBJECT (object), "unset-ao", value, NULL);
3207 * foo_igen_bar_get_unset_ag: (skip)
3208 * @object: A #FooiGenBar.
3210 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_ag">"unset_ag"</link> D-Bus property.
3212 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3214 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_ag() if on another thread.</warning>
3216 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
3219 foo_igen_bar_get_unset_ag (FooiGenBar *object)
3221 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_ag (object);
3225 * foo_igen_bar_dup_unset_ag: (skip)
3226 * @object: A #FooiGenBar.
3228 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_ag">"unset_ag"</link> D-Bus property.
3230 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3232 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
3235 foo_igen_bar_dup_unset_ag (FooiGenBar *object)
3238 g_object_get (G_OBJECT (object), "unset-ag", &value, NULL);
3243 * foo_igen_bar_set_unset_ag: (skip)
3244 * @object: A #FooiGenBar.
3245 * @value: The value to set.
3247 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_ag">"unset_ag"</link> D-Bus property to @value.
3249 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3252 foo_igen_bar_set_unset_ag (FooiGenBar *object, GVariant *value)
3254 g_object_set (G_OBJECT (object), "unset-ag", value, NULL);
3258 * foo_igen_bar_get_unset_struct: (skip)
3259 * @object: A #FooiGenBar.
3261 * Gets the value of the <link linkend="gdbus-property-org-project-Bar.unset_struct">"unset_struct"</link> D-Bus property.
3263 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3265 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bar_dup_unset_struct() if on another thread.</warning>
3267 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
3270 foo_igen_bar_get_unset_struct (FooiGenBar *object)
3272 return FOO_IGEN_BAR_GET_IFACE (object)->get_unset_struct (object);
3276 * foo_igen_bar_dup_unset_struct: (skip)
3277 * @object: A #FooiGenBar.
3279 * Gets a copy of the <link linkend="gdbus-property-org-project-Bar.unset_struct">"unset_struct"</link> D-Bus property.
3281 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3283 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
3286 foo_igen_bar_dup_unset_struct (FooiGenBar *object)
3289 g_object_get (G_OBJECT (object), "unset-struct", &value, NULL);
3294 * foo_igen_bar_set_unset_struct: (skip)
3295 * @object: A #FooiGenBar.
3296 * @value: The value to set.
3298 * Sets the <link linkend="gdbus-property-org-project-Bar.unset_struct">"unset_struct"</link> D-Bus property to @value.
3300 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
3303 foo_igen_bar_set_unset_struct (FooiGenBar *object, GVariant *value)
3305 g_object_set (G_OBJECT (object), "unset-struct", value, NULL);
3309 * foo_igen_bar_emit_test_signal:
3310 * @object: A #FooiGenBar.
3311 * @arg_val_int32: Argument to pass with the signal.
3312 * @arg_array_of_strings: Argument to pass with the signal.
3313 * @arg_array_of_bytestrings: Argument to pass with the signal.
3314 * @arg_dict_s_to_pairs: Argument to pass with the signal.
3316 * Emits the <link linkend="gdbus-signal-org-project-Bar.TestSignal">"TestSignal"</link> D-Bus signal.
3319 foo_igen_bar_emit_test_signal (
3322 const gchar *const *arg_array_of_strings,
3323 const gchar *const *arg_array_of_bytestrings,
3324 GVariant *arg_dict_s_to_pairs)
3326 g_signal_emit_by_name (object, "test-signal", arg_val_int32, arg_array_of_strings, arg_array_of_bytestrings, arg_dict_s_to_pairs);
3330 * foo_igen_bar_emit_another_signal:
3331 * @object: A #FooiGenBar.
3332 * @arg_word: Argument to pass with the signal.
3334 * Emits the <link linkend="gdbus-signal-org-project-Bar.AnotherSignal">"AnotherSignal"</link> D-Bus signal.
3337 foo_igen_bar_emit_another_signal (
3339 const gchar *arg_word)
3341 g_signal_emit_by_name (object, "another-signal", arg_word);
3345 * foo_igen_bar_call_hello_world:
3346 * @proxy: A #FooiGenBarProxy.
3347 * @arg_greeting: Argument to pass with the method invocation.
3348 * @cancellable: (allow-none): A #GCancellable or %NULL.
3349 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3350 * @user_data: User data to pass to @callback.
3352 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.HelloWorld">HelloWorld()</link> D-Bus method on @proxy.
3353 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
3354 * You can then call foo_igen_bar_call_hello_world_finish() to get the result of the operation.
3356 * See foo_igen_bar_call_hello_world_sync() for the synchronous, blocking version of this method.
3359 foo_igen_bar_call_hello_world (
3361 const gchar *arg_greeting,
3362 GCancellable *cancellable,
3363 GAsyncReadyCallback callback,
3366 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3368 g_variant_new ("(s)",
3370 G_DBUS_CALL_FLAGS_NONE,
3378 * foo_igen_bar_call_hello_world_finish:
3379 * @proxy: A #FooiGenBarProxy.
3380 * @out_response: (out): Return location for return parameter or %NULL to ignore.
3381 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_hello_world().
3382 * @error: Return location for error or %NULL.
3384 * Finishes an operation started with foo_igen_bar_call_hello_world().
3386 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3389 foo_igen_bar_call_hello_world_finish (
3391 gchar **out_response,
3396 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3399 g_variant_get (_ret,
3402 g_variant_unref (_ret);
3404 return _ret != NULL;
3408 * foo_igen_bar_call_hello_world_sync:
3409 * @proxy: A #FooiGenBarProxy.
3410 * @arg_greeting: Argument to pass with the method invocation.
3411 * @out_response: (out): Return location for return parameter or %NULL to ignore.
3412 * @cancellable: (allow-none): A #GCancellable or %NULL.
3413 * @error: Return location for error or %NULL.
3415 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.HelloWorld">HelloWorld()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3417 * See foo_igen_bar_call_hello_world() for the asynchronous version of this method.
3419 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3422 foo_igen_bar_call_hello_world_sync (
3424 const gchar *arg_greeting,
3425 gchar **out_response,
3426 GCancellable *cancellable,
3430 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3432 g_variant_new ("(s)",
3434 G_DBUS_CALL_FLAGS_NONE,
3440 g_variant_get (_ret,
3443 g_variant_unref (_ret);
3445 return _ret != NULL;
3449 * foo_igen_bar_call_test_primitive_types:
3450 * @proxy: A #FooiGenBarProxy.
3451 * @arg_val_byte: Argument to pass with the method invocation.
3452 * @arg_val_boolean: Argument to pass with the method invocation.
3453 * @arg_val_int16: Argument to pass with the method invocation.
3454 * @arg_val_uint16: Argument to pass with the method invocation.
3455 * @arg_val_int32: Argument to pass with the method invocation.
3456 * @arg_val_uint32: Argument to pass with the method invocation.
3457 * @arg_val_int64: Argument to pass with the method invocation.
3458 * @arg_val_uint64: Argument to pass with the method invocation.
3459 * @arg_val_double: Argument to pass with the method invocation.
3460 * @arg_val_string: Argument to pass with the method invocation.
3461 * @arg_val_objpath: Argument to pass with the method invocation.
3462 * @arg_val_signature: Argument to pass with the method invocation.
3463 * @arg_val_bytestring: Argument to pass with the method invocation.
3464 * @cancellable: (allow-none): A #GCancellable or %NULL.
3465 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3466 * @user_data: User data to pass to @callback.
3468 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.TestPrimitiveTypes">TestPrimitiveTypes()</link> D-Bus method on @proxy.
3469 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
3470 * You can then call foo_igen_bar_call_test_primitive_types_finish() to get the result of the operation.
3472 * See foo_igen_bar_call_test_primitive_types_sync() for the synchronous, blocking version of this method.
3475 foo_igen_bar_call_test_primitive_types (
3477 guchar arg_val_byte,
3478 gboolean arg_val_boolean,
3479 gint16 arg_val_int16,
3480 guint16 arg_val_uint16,
3482 guint arg_val_uint32,
3483 gint64 arg_val_int64,
3484 guint64 arg_val_uint64,
3485 gdouble arg_val_double,
3486 const gchar *arg_val_string,
3487 const gchar *arg_val_objpath,
3488 const gchar *arg_val_signature,
3489 const gchar *arg_val_bytestring,
3490 GCancellable *cancellable,
3491 GAsyncReadyCallback callback,
3494 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3495 "TestPrimitiveTypes",
3496 g_variant_new ("(ybnqiuxtdsog^ay)",
3509 arg_val_bytestring),
3510 G_DBUS_CALL_FLAGS_NONE,
3518 * foo_igen_bar_call_test_primitive_types_finish:
3519 * @proxy: A #FooiGenBarProxy.
3520 * @out_ret_byte: (out): Return location for return parameter or %NULL to ignore.
3521 * @out_ret_boolean: (out): Return location for return parameter or %NULL to ignore.
3522 * @out_ret_int16: (out): Return location for return parameter or %NULL to ignore.
3523 * @out_ret_uint16: (out): Return location for return parameter or %NULL to ignore.
3524 * @out_ret_int32: (out): Return location for return parameter or %NULL to ignore.
3525 * @out_ret_uint32: (out): Return location for return parameter or %NULL to ignore.
3526 * @out_ret_int64: (out): Return location for return parameter or %NULL to ignore.
3527 * @out_ret_uint64: (out): Return location for return parameter or %NULL to ignore.
3528 * @out_ret_double: (out): Return location for return parameter or %NULL to ignore.
3529 * @out_ret_string: (out): Return location for return parameter or %NULL to ignore.
3530 * @out_ret_objpath: (out): Return location for return parameter or %NULL to ignore.
3531 * @out_ret_signature: (out): Return location for return parameter or %NULL to ignore.
3532 * @out_ret_bytestring: (out): Return location for return parameter or %NULL to ignore.
3533 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_test_primitive_types().
3534 * @error: Return location for error or %NULL.
3536 * Finishes an operation started with foo_igen_bar_call_test_primitive_types().
3538 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3541 foo_igen_bar_call_test_primitive_types_finish (
3543 guchar *out_ret_byte,
3544 gboolean *out_ret_boolean,
3545 gint16 *out_ret_int16,
3546 guint16 *out_ret_uint16,
3547 gint *out_ret_int32,
3548 guint *out_ret_uint32,
3549 gint64 *out_ret_int64,
3550 guint64 *out_ret_uint64,
3551 gdouble *out_ret_double,
3552 gchar **out_ret_string,
3553 gchar **out_ret_objpath,
3554 gchar **out_ret_signature,
3555 gchar **out_ret_bytestring,
3560 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3563 g_variant_get (_ret,
3564 "(ybnqiuxtdsog^ay)",
3577 out_ret_bytestring);
3578 g_variant_unref (_ret);
3580 return _ret != NULL;
3584 * foo_igen_bar_call_test_primitive_types_sync:
3585 * @proxy: A #FooiGenBarProxy.
3586 * @arg_val_byte: Argument to pass with the method invocation.
3587 * @arg_val_boolean: Argument to pass with the method invocation.
3588 * @arg_val_int16: Argument to pass with the method invocation.
3589 * @arg_val_uint16: Argument to pass with the method invocation.
3590 * @arg_val_int32: Argument to pass with the method invocation.
3591 * @arg_val_uint32: Argument to pass with the method invocation.
3592 * @arg_val_int64: Argument to pass with the method invocation.
3593 * @arg_val_uint64: Argument to pass with the method invocation.
3594 * @arg_val_double: Argument to pass with the method invocation.
3595 * @arg_val_string: Argument to pass with the method invocation.
3596 * @arg_val_objpath: Argument to pass with the method invocation.
3597 * @arg_val_signature: Argument to pass with the method invocation.
3598 * @arg_val_bytestring: Argument to pass with the method invocation.
3599 * @out_ret_byte: (out): Return location for return parameter or %NULL to ignore.
3600 * @out_ret_boolean: (out): Return location for return parameter or %NULL to ignore.
3601 * @out_ret_int16: (out): Return location for return parameter or %NULL to ignore.
3602 * @out_ret_uint16: (out): Return location for return parameter or %NULL to ignore.
3603 * @out_ret_int32: (out): Return location for return parameter or %NULL to ignore.
3604 * @out_ret_uint32: (out): Return location for return parameter or %NULL to ignore.
3605 * @out_ret_int64: (out): Return location for return parameter or %NULL to ignore.
3606 * @out_ret_uint64: (out): Return location for return parameter or %NULL to ignore.
3607 * @out_ret_double: (out): Return location for return parameter or %NULL to ignore.
3608 * @out_ret_string: (out): Return location for return parameter or %NULL to ignore.
3609 * @out_ret_objpath: (out): Return location for return parameter or %NULL to ignore.
3610 * @out_ret_signature: (out): Return location for return parameter or %NULL to ignore.
3611 * @out_ret_bytestring: (out): Return location for return parameter or %NULL to ignore.
3612 * @cancellable: (allow-none): A #GCancellable or %NULL.
3613 * @error: Return location for error or %NULL.
3615 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.TestPrimitiveTypes">TestPrimitiveTypes()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3617 * See foo_igen_bar_call_test_primitive_types() for the asynchronous version of this method.
3619 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3622 foo_igen_bar_call_test_primitive_types_sync (
3624 guchar arg_val_byte,
3625 gboolean arg_val_boolean,
3626 gint16 arg_val_int16,
3627 guint16 arg_val_uint16,
3629 guint arg_val_uint32,
3630 gint64 arg_val_int64,
3631 guint64 arg_val_uint64,
3632 gdouble arg_val_double,
3633 const gchar *arg_val_string,
3634 const gchar *arg_val_objpath,
3635 const gchar *arg_val_signature,
3636 const gchar *arg_val_bytestring,
3637 guchar *out_ret_byte,
3638 gboolean *out_ret_boolean,
3639 gint16 *out_ret_int16,
3640 guint16 *out_ret_uint16,
3641 gint *out_ret_int32,
3642 guint *out_ret_uint32,
3643 gint64 *out_ret_int64,
3644 guint64 *out_ret_uint64,
3645 gdouble *out_ret_double,
3646 gchar **out_ret_string,
3647 gchar **out_ret_objpath,
3648 gchar **out_ret_signature,
3649 gchar **out_ret_bytestring,
3650 GCancellable *cancellable,
3654 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3655 "TestPrimitiveTypes",
3656 g_variant_new ("(ybnqiuxtdsog^ay)",
3669 arg_val_bytestring),
3670 G_DBUS_CALL_FLAGS_NONE,
3676 g_variant_get (_ret,
3677 "(ybnqiuxtdsog^ay)",
3690 out_ret_bytestring);
3691 g_variant_unref (_ret);
3693 return _ret != NULL;
3697 * foo_igen_bar_call_test_non_primitive_types:
3698 * @proxy: A #FooiGenBarProxy.
3699 * @arg_dict_s_to_s: Argument to pass with the method invocation.
3700 * @arg_dict_s_to_pairs: Argument to pass with the method invocation.
3701 * @arg_a_struct: Argument to pass with the method invocation.
3702 * @arg_array_of_strings: Argument to pass with the method invocation.
3703 * @arg_array_of_objpaths: Argument to pass with the method invocation.
3704 * @arg_array_of_signatures: Argument to pass with the method invocation.
3705 * @arg_array_of_bytestrings: Argument to pass with the method invocation.
3706 * @cancellable: (allow-none): A #GCancellable or %NULL.
3707 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3708 * @user_data: User data to pass to @callback.
3710 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.TestNonPrimitiveTypes">TestNonPrimitiveTypes()</link> D-Bus method on @proxy.
3711 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
3712 * You can then call foo_igen_bar_call_test_non_primitive_types_finish() to get the result of the operation.
3714 * See foo_igen_bar_call_test_non_primitive_types_sync() for the synchronous, blocking version of this method.
3717 foo_igen_bar_call_test_non_primitive_types (
3719 GVariant *arg_dict_s_to_s,
3720 GVariant *arg_dict_s_to_pairs,
3721 GVariant *arg_a_struct,
3722 const gchar *const *arg_array_of_strings,
3723 const gchar *const *arg_array_of_objpaths,
3724 GVariant *arg_array_of_signatures,
3725 const gchar *const *arg_array_of_bytestrings,
3726 GCancellable *cancellable,
3727 GAsyncReadyCallback callback,
3730 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3731 "TestNonPrimitiveTypes",
3732 g_variant_new ("(@a{ss}@a{s(ii)}@(iss)^as^ao@ag^aay)",
3734 arg_dict_s_to_pairs,
3736 arg_array_of_strings,
3737 arg_array_of_objpaths,
3738 arg_array_of_signatures,
3739 arg_array_of_bytestrings),
3740 G_DBUS_CALL_FLAGS_NONE,
3748 * foo_igen_bar_call_test_non_primitive_types_finish:
3749 * @proxy: A #FooiGenBarProxy.
3750 * @out_result: (out): Return location for return parameter or %NULL to ignore.
3751 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_test_non_primitive_types().
3752 * @error: Return location for error or %NULL.
3754 * Finishes an operation started with foo_igen_bar_call_test_non_primitive_types().
3756 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3759 foo_igen_bar_call_test_non_primitive_types_finish (
3766 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3769 g_variant_get (_ret,
3772 g_variant_unref (_ret);
3774 return _ret != NULL;
3778 * foo_igen_bar_call_test_non_primitive_types_sync:
3779 * @proxy: A #FooiGenBarProxy.
3780 * @arg_dict_s_to_s: Argument to pass with the method invocation.
3781 * @arg_dict_s_to_pairs: Argument to pass with the method invocation.
3782 * @arg_a_struct: Argument to pass with the method invocation.
3783 * @arg_array_of_strings: Argument to pass with the method invocation.
3784 * @arg_array_of_objpaths: Argument to pass with the method invocation.
3785 * @arg_array_of_signatures: Argument to pass with the method invocation.
3786 * @arg_array_of_bytestrings: Argument to pass with the method invocation.
3787 * @out_result: (out): Return location for return parameter or %NULL to ignore.
3788 * @cancellable: (allow-none): A #GCancellable or %NULL.
3789 * @error: Return location for error or %NULL.
3791 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.TestNonPrimitiveTypes">TestNonPrimitiveTypes()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3793 * See foo_igen_bar_call_test_non_primitive_types() for the asynchronous version of this method.
3795 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3798 foo_igen_bar_call_test_non_primitive_types_sync (
3800 GVariant *arg_dict_s_to_s,
3801 GVariant *arg_dict_s_to_pairs,
3802 GVariant *arg_a_struct,
3803 const gchar *const *arg_array_of_strings,
3804 const gchar *const *arg_array_of_objpaths,
3805 GVariant *arg_array_of_signatures,
3806 const gchar *const *arg_array_of_bytestrings,
3808 GCancellable *cancellable,
3812 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3813 "TestNonPrimitiveTypes",
3814 g_variant_new ("(@a{ss}@a{s(ii)}@(iss)^as^ao@ag^aay)",
3816 arg_dict_s_to_pairs,
3818 arg_array_of_strings,
3819 arg_array_of_objpaths,
3820 arg_array_of_signatures,
3821 arg_array_of_bytestrings),
3822 G_DBUS_CALL_FLAGS_NONE,
3828 g_variant_get (_ret,
3831 g_variant_unref (_ret);
3833 return _ret != NULL;
3837 * foo_igen_bar_call_request_signal_emission:
3838 * @proxy: A #FooiGenBarProxy.
3839 * @arg_which_one: Argument to pass with the method invocation.
3840 * @cancellable: (allow-none): A #GCancellable or %NULL.
3841 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3842 * @user_data: User data to pass to @callback.
3844 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.RequestSignalEmission">RequestSignalEmission()</link> D-Bus method on @proxy.
3845 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
3846 * You can then call foo_igen_bar_call_request_signal_emission_finish() to get the result of the operation.
3848 * See foo_igen_bar_call_request_signal_emission_sync() for the synchronous, blocking version of this method.
3851 foo_igen_bar_call_request_signal_emission (
3854 GCancellable *cancellable,
3855 GAsyncReadyCallback callback,
3858 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3859 "RequestSignalEmission",
3860 g_variant_new ("(i)",
3862 G_DBUS_CALL_FLAGS_NONE,
3870 * foo_igen_bar_call_request_signal_emission_finish:
3871 * @proxy: A #FooiGenBarProxy.
3872 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_request_signal_emission().
3873 * @error: Return location for error or %NULL.
3875 * Finishes an operation started with foo_igen_bar_call_request_signal_emission().
3877 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3880 foo_igen_bar_call_request_signal_emission_finish (
3886 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3889 g_variant_get (_ret,
3891 g_variant_unref (_ret);
3893 return _ret != NULL;
3897 * foo_igen_bar_call_request_signal_emission_sync:
3898 * @proxy: A #FooiGenBarProxy.
3899 * @arg_which_one: Argument to pass with the method invocation.
3900 * @cancellable: (allow-none): A #GCancellable or %NULL.
3901 * @error: Return location for error or %NULL.
3903 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.RequestSignalEmission">RequestSignalEmission()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3905 * See foo_igen_bar_call_request_signal_emission() for the asynchronous version of this method.
3907 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3910 foo_igen_bar_call_request_signal_emission_sync (
3913 GCancellable *cancellable,
3917 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3918 "RequestSignalEmission",
3919 g_variant_new ("(i)",
3921 G_DBUS_CALL_FLAGS_NONE,
3927 g_variant_get (_ret,
3929 g_variant_unref (_ret);
3931 return _ret != NULL;
3935 * foo_igen_bar_call_request_multi_property_mods:
3936 * @proxy: A #FooiGenBarProxy.
3937 * @cancellable: (allow-none): A #GCancellable or %NULL.
3938 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3939 * @user_data: User data to pass to @callback.
3941 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.RequestMultiPropertyMods">RequestMultiPropertyMods()</link> D-Bus method on @proxy.
3942 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
3943 * You can then call foo_igen_bar_call_request_multi_property_mods_finish() to get the result of the operation.
3945 * See foo_igen_bar_call_request_multi_property_mods_sync() for the synchronous, blocking version of this method.
3948 foo_igen_bar_call_request_multi_property_mods (
3950 GCancellable *cancellable,
3951 GAsyncReadyCallback callback,
3954 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3955 "RequestMultiPropertyMods",
3956 g_variant_new ("()"),
3957 G_DBUS_CALL_FLAGS_NONE,
3965 * foo_igen_bar_call_request_multi_property_mods_finish:
3966 * @proxy: A #FooiGenBarProxy.
3967 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_request_multi_property_mods().
3968 * @error: Return location for error or %NULL.
3970 * Finishes an operation started with foo_igen_bar_call_request_multi_property_mods().
3972 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3975 foo_igen_bar_call_request_multi_property_mods_finish (
3981 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3984 g_variant_get (_ret,
3986 g_variant_unref (_ret);
3988 return _ret != NULL;
3992 * foo_igen_bar_call_request_multi_property_mods_sync:
3993 * @proxy: A #FooiGenBarProxy.
3994 * @cancellable: (allow-none): A #GCancellable or %NULL.
3995 * @error: Return location for error or %NULL.
3997 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.RequestMultiPropertyMods">RequestMultiPropertyMods()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3999 * See foo_igen_bar_call_request_multi_property_mods() for the asynchronous version of this method.
4001 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4004 foo_igen_bar_call_request_multi_property_mods_sync (
4006 GCancellable *cancellable,
4010 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
4011 "RequestMultiPropertyMods",
4012 g_variant_new ("()"),
4013 G_DBUS_CALL_FLAGS_NONE,
4019 g_variant_get (_ret,
4021 g_variant_unref (_ret);
4023 return _ret != NULL;
4027 * foo_igen_bar_call_unimplemented_method:
4028 * @proxy: A #FooiGenBarProxy.
4029 * @cancellable: (allow-none): A #GCancellable or %NULL.
4030 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
4031 * @user_data: User data to pass to @callback.
4033 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.UnimplementedMethod">UnimplementedMethod()</link> D-Bus method on @proxy.
4034 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
4035 * You can then call foo_igen_bar_call_unimplemented_method_finish() to get the result of the operation.
4037 * See foo_igen_bar_call_unimplemented_method_sync() for the synchronous, blocking version of this method.
4040 foo_igen_bar_call_unimplemented_method (
4042 GCancellable *cancellable,
4043 GAsyncReadyCallback callback,
4046 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
4047 "UnimplementedMethod",
4048 g_variant_new ("()"),
4049 G_DBUS_CALL_FLAGS_NONE,
4057 * foo_igen_bar_call_unimplemented_method_finish:
4058 * @proxy: A #FooiGenBarProxy.
4059 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_unimplemented_method().
4060 * @error: Return location for error or %NULL.
4062 * Finishes an operation started with foo_igen_bar_call_unimplemented_method().
4064 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4067 foo_igen_bar_call_unimplemented_method_finish (
4073 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
4076 g_variant_get (_ret,
4078 g_variant_unref (_ret);
4080 return _ret != NULL;
4084 * foo_igen_bar_call_unimplemented_method_sync:
4085 * @proxy: A #FooiGenBarProxy.
4086 * @cancellable: (allow-none): A #GCancellable or %NULL.
4087 * @error: Return location for error or %NULL.
4089 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.UnimplementedMethod">UnimplementedMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
4091 * See foo_igen_bar_call_unimplemented_method() for the asynchronous version of this method.
4093 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4096 foo_igen_bar_call_unimplemented_method_sync (
4098 GCancellable *cancellable,
4102 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
4103 "UnimplementedMethod",
4104 g_variant_new ("()"),
4105 G_DBUS_CALL_FLAGS_NONE,
4111 g_variant_get (_ret,
4113 g_variant_unref (_ret);
4115 return _ret != NULL;
4119 * foo_igen_bar_call_property_cancellation:
4120 * @proxy: A #FooiGenBarProxy.
4121 * @cancellable: (allow-none): A #GCancellable or %NULL.
4122 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
4123 * @user_data: User data to pass to @callback.
4125 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar.PropertyCancellation">PropertyCancellation()</link> D-Bus method on @proxy.
4126 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
4127 * You can then call foo_igen_bar_call_property_cancellation_finish() to get the result of the operation.
4129 * See foo_igen_bar_call_property_cancellation_sync() for the synchronous, blocking version of this method.
4132 foo_igen_bar_call_property_cancellation (
4134 GCancellable *cancellable,
4135 GAsyncReadyCallback callback,
4138 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
4139 "PropertyCancellation",
4140 g_variant_new ("()"),
4141 G_DBUS_CALL_FLAGS_NONE,
4149 * foo_igen_bar_call_property_cancellation_finish:
4150 * @proxy: A #FooiGenBarProxy.
4151 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_call_property_cancellation().
4152 * @error: Return location for error or %NULL.
4154 * Finishes an operation started with foo_igen_bar_call_property_cancellation().
4156 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4159 foo_igen_bar_call_property_cancellation_finish (
4165 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
4168 g_variant_get (_ret,
4170 g_variant_unref (_ret);
4172 return _ret != NULL;
4176 * foo_igen_bar_call_property_cancellation_sync:
4177 * @proxy: A #FooiGenBarProxy.
4178 * @cancellable: (allow-none): A #GCancellable or %NULL.
4179 * @error: Return location for error or %NULL.
4181 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar.PropertyCancellation">PropertyCancellation()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
4183 * See foo_igen_bar_call_property_cancellation() for the asynchronous version of this method.
4185 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4188 foo_igen_bar_call_property_cancellation_sync (
4190 GCancellable *cancellable,
4194 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
4195 "PropertyCancellation",
4196 g_variant_new ("()"),
4197 G_DBUS_CALL_FLAGS_NONE,
4203 g_variant_get (_ret,
4205 g_variant_unref (_ret);
4207 return _ret != NULL;
4211 * foo_igen_bar_complete_hello_world:
4212 * @object: A #FooiGenBar.
4213 * @invocation: (transfer full): A #GDBusMethodInvocation.
4214 * @response: Parameter to return.
4216 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.HelloWorld">HelloWorld()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4218 * This method will free @invocation, you cannot use it afterwards.
4221 foo_igen_bar_complete_hello_world (
4223 GDBusMethodInvocation *invocation,
4224 const gchar *response)
4226 g_dbus_method_invocation_return_value (invocation,
4227 g_variant_new ("(s)",
4232 * foo_igen_bar_complete_test_primitive_types:
4233 * @object: A #FooiGenBar.
4234 * @invocation: (transfer full): A #GDBusMethodInvocation.
4235 * @ret_byte: Parameter to return.
4236 * @ret_boolean: Parameter to return.
4237 * @ret_int16: Parameter to return.
4238 * @ret_uint16: Parameter to return.
4239 * @ret_int32: Parameter to return.
4240 * @ret_uint32: Parameter to return.
4241 * @ret_int64: Parameter to return.
4242 * @ret_uint64: Parameter to return.
4243 * @ret_double: Parameter to return.
4244 * @ret_string: Parameter to return.
4245 * @ret_objpath: Parameter to return.
4246 * @ret_signature: Parameter to return.
4247 * @ret_bytestring: Parameter to return.
4249 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.TestPrimitiveTypes">TestPrimitiveTypes()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4251 * This method will free @invocation, you cannot use it afterwards.
4254 foo_igen_bar_complete_test_primitive_types (
4256 GDBusMethodInvocation *invocation,
4258 gboolean ret_boolean,
4266 const gchar *ret_string,
4267 const gchar *ret_objpath,
4268 const gchar *ret_signature,
4269 const gchar *ret_bytestring)
4271 g_dbus_method_invocation_return_value (invocation,
4272 g_variant_new ("(ybnqiuxtdsog^ay)",
4289 * foo_igen_bar_complete_test_non_primitive_types:
4290 * @object: A #FooiGenBar.
4291 * @invocation: (transfer full): A #GDBusMethodInvocation.
4292 * @result: Parameter to return.
4294 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.TestNonPrimitiveTypes">TestNonPrimitiveTypes()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4296 * This method will free @invocation, you cannot use it afterwards.
4299 foo_igen_bar_complete_test_non_primitive_types (
4301 GDBusMethodInvocation *invocation,
4302 const gchar *result)
4304 g_dbus_method_invocation_return_value (invocation,
4305 g_variant_new ("(^ay)",
4310 * foo_igen_bar_complete_request_signal_emission:
4311 * @object: A #FooiGenBar.
4312 * @invocation: (transfer full): A #GDBusMethodInvocation.
4314 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.RequestSignalEmission">RequestSignalEmission()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4316 * This method will free @invocation, you cannot use it afterwards.
4319 foo_igen_bar_complete_request_signal_emission (
4321 GDBusMethodInvocation *invocation)
4323 g_dbus_method_invocation_return_value (invocation,
4324 g_variant_new ("()"));
4328 * foo_igen_bar_complete_request_multi_property_mods:
4329 * @object: A #FooiGenBar.
4330 * @invocation: (transfer full): A #GDBusMethodInvocation.
4332 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.RequestMultiPropertyMods">RequestMultiPropertyMods()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4334 * This method will free @invocation, you cannot use it afterwards.
4337 foo_igen_bar_complete_request_multi_property_mods (
4339 GDBusMethodInvocation *invocation)
4341 g_dbus_method_invocation_return_value (invocation,
4342 g_variant_new ("()"));
4346 * foo_igen_bar_complete_unimplemented_method:
4347 * @object: A #FooiGenBar.
4348 * @invocation: (transfer full): A #GDBusMethodInvocation.
4350 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.UnimplementedMethod">UnimplementedMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4352 * This method will free @invocation, you cannot use it afterwards.
4355 foo_igen_bar_complete_unimplemented_method (
4357 GDBusMethodInvocation *invocation)
4359 g_dbus_method_invocation_return_value (invocation,
4360 g_variant_new ("()"));
4364 * foo_igen_bar_complete_property_cancellation:
4365 * @object: A #FooiGenBar.
4366 * @invocation: (transfer full): A #GDBusMethodInvocation.
4368 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar.PropertyCancellation">PropertyCancellation()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
4370 * This method will free @invocation, you cannot use it afterwards.
4373 foo_igen_bar_complete_property_cancellation (
4375 GDBusMethodInvocation *invocation)
4377 g_dbus_method_invocation_return_value (invocation,
4378 g_variant_new ("()"));
4381 /* ------------------------------------------------------------------------ */
4386 * The #FooiGenBarProxy structure contains only private data and should only be accessed using the provided API.
4390 * FooiGenBarProxyClass:
4391 * @parent_class: The parent class.
4393 * Class structure for #FooiGenBarProxy.
4396 struct _FooiGenBarProxyPrivate
4401 static void foo_igen_bar_proxy_iface_init (FooiGenBarIface *iface);
4403 G_DEFINE_TYPE_WITH_CODE (FooiGenBarProxy, foo_igen_bar_proxy, G_TYPE_DBUS_PROXY,
4404 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAR, foo_igen_bar_proxy_iface_init));
4407 foo_igen_bar_proxy_finalize (GObject *object)
4409 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4410 g_datalist_clear (&proxy->priv->qdata);
4411 G_OBJECT_CLASS (foo_igen_bar_proxy_parent_class)->finalize (object);
4415 foo_igen_bar_proxy_get_property (GObject *object,
4420 const _ExtendedGDBusPropertyInfo *info;
4422 g_assert (prop_id != 0 && prop_id - 1 < 30);
4423 info = _foo_igen_bar_property_info_pointers[prop_id - 1];
4424 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
4425 if (info->use_gvariant)
4427 g_value_set_variant (value, variant);
4431 if (variant != NULL)
4432 g_dbus_gvariant_to_gvalue (variant, value);
4434 if (variant != NULL)
4435 g_variant_unref (variant);
4439 foo_igen_bar_proxy_set_property_cb (GDBusProxy *proxy,
4443 const _ExtendedGDBusPropertyInfo *info = user_data;
4446 if (!g_dbus_proxy_call_finish (proxy, res, &error))
4448 g_warning ("Error setting property `%s' on interface org.project.Bar: %s (%s, %d)",
4449 info->parent_struct.name,
4450 error->message, g_quark_to_string (error->domain), error->code);
4451 g_error_free (error);
4456 foo_igen_bar_proxy_set_property (GObject *object,
4458 const GValue *value,
4461 const _ExtendedGDBusPropertyInfo *info;
4463 g_assert (prop_id != 0 && prop_id - 1 < 30);
4464 info = _foo_igen_bar_property_info_pointers[prop_id - 1];
4465 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
4466 g_dbus_proxy_call (G_DBUS_PROXY (object),
4467 "org.freedesktop.DBus.Properties.Set",
4468 g_variant_new ("(ssv)", "org.project.Bar", info->parent_struct.name, variant),
4469 G_DBUS_CALL_FLAGS_NONE,
4471 NULL, (GAsyncReadyCallback) foo_igen_bar_proxy_set_property_cb, (gpointer) info);
4472 g_variant_unref (variant);
4476 foo_igen_bar_proxy_g_signal (GDBusProxy *proxy,
4477 const gchar *sender_name,
4478 const gchar *signal_name,
4479 GVariant *parameters)
4481 _ExtendedGDBusSignalInfo *info;
4488 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_bar_interface_info, signal_name);
4491 num_params = g_variant_n_children (parameters);
4492 paramv = g_new0 (GValue, num_params + 1);
4493 g_value_init (¶mv[0], FOO_IGEN_TYPE_BAR);
4494 g_value_set_object (¶mv[0], proxy);
4495 g_variant_iter_init (&iter, parameters);
4497 while ((child = g_variant_iter_next_value (&iter)) != NULL)
4499 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
4500 if (arg_info->use_gvariant)
4502 g_value_init (¶mv[n], G_TYPE_VARIANT);
4503 g_value_set_variant (¶mv[n], child);
4507 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
4508 g_variant_unref (child);
4510 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAR);
4511 g_signal_emitv (paramv, signal_id, 0, NULL);
4512 for (n = 0; n < num_params + 1; n++)
4513 g_value_unset (¶mv[n]);
4518 foo_igen_bar_proxy_g_properties_changed (GDBusProxy *_proxy,
4519 GVariant *changed_properties,
4520 const gchar *const *invalidated_properties)
4522 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (_proxy);
4526 _ExtendedGDBusPropertyInfo *info;
4527 g_variant_get (changed_properties, "a{sv}", &iter);
4528 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
4530 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_interface_info, key);
4531 g_datalist_remove_data (&proxy->priv->qdata, key);
4533 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
4535 g_variant_iter_free (iter);
4536 for (n = 0; invalidated_properties[n] != NULL; n++)
4538 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_interface_info, invalidated_properties[n]);
4539 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
4541 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
4546 foo_igen_bar_proxy_get_y (FooiGenBar *object)
4548 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4551 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "y");
4552 if (variant != NULL)
4554 value = g_variant_get_byte (variant);
4555 g_variant_unref (variant);
4561 foo_igen_bar_proxy_get_b (FooiGenBar *object)
4563 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4566 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "b");
4567 if (variant != NULL)
4569 value = g_variant_get_boolean (variant);
4570 g_variant_unref (variant);
4576 foo_igen_bar_proxy_get_n (FooiGenBar *object)
4578 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4581 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "n");
4582 if (variant != NULL)
4584 value = g_variant_get_int16 (variant);
4585 g_variant_unref (variant);
4591 foo_igen_bar_proxy_get_q (FooiGenBar *object)
4593 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4596 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "q");
4597 if (variant != NULL)
4599 value = g_variant_get_uint16 (variant);
4600 g_variant_unref (variant);
4606 foo_igen_bar_proxy_get_i (FooiGenBar *object)
4608 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4611 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "i");
4612 if (variant != NULL)
4614 value = g_variant_get_int32 (variant);
4615 g_variant_unref (variant);
4621 foo_igen_bar_proxy_get_u (FooiGenBar *object)
4623 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4626 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "u");
4627 if (variant != NULL)
4629 value = g_variant_get_uint32 (variant);
4630 g_variant_unref (variant);
4636 foo_igen_bar_proxy_get_x (FooiGenBar *object)
4638 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4641 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "x");
4642 if (variant != NULL)
4644 value = g_variant_get_int64 (variant);
4645 g_variant_unref (variant);
4651 foo_igen_bar_proxy_get_t (FooiGenBar *object)
4653 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4656 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "t");
4657 if (variant != NULL)
4659 value = g_variant_get_uint64 (variant);
4660 g_variant_unref (variant);
4666 foo_igen_bar_proxy_get_d (FooiGenBar *object)
4668 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4671 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "d");
4672 if (variant != NULL)
4674 value = g_variant_get_double (variant);
4675 g_variant_unref (variant);
4680 static const gchar *
4681 foo_igen_bar_proxy_get_s (FooiGenBar *object)
4683 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4685 const gchar *value = NULL;
4686 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "s");
4687 if (variant != NULL)
4689 value = g_variant_get_string (variant, NULL);
4690 g_variant_unref (variant);
4695 static const gchar *
4696 foo_igen_bar_proxy_get_o (FooiGenBar *object)
4698 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4700 const gchar *value = NULL;
4701 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "o");
4702 if (variant != NULL)
4704 value = g_variant_get_string (variant, NULL);
4705 g_variant_unref (variant);
4710 static const gchar *
4711 foo_igen_bar_proxy_get_g (FooiGenBar *object)
4713 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4715 const gchar *value = NULL;
4716 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "g");
4717 if (variant != NULL)
4719 value = g_variant_get_string (variant, NULL);
4720 g_variant_unref (variant);
4725 static const gchar *
4726 foo_igen_bar_proxy_get_ay (FooiGenBar *object)
4728 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4730 const gchar *value = NULL;
4731 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ay");
4732 if (variant != NULL)
4734 value = g_variant_get_bytestring (variant);
4735 g_variant_unref (variant);
4740 static const gchar *const *
4741 foo_igen_bar_proxy_get_as (FooiGenBar *object)
4743 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4745 const gchar *const *value = NULL;
4746 value = g_datalist_get_data (&proxy->priv->qdata, "as");
4749 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "as");
4750 if (variant != NULL)
4752 value = g_variant_get_strv (variant, NULL);
4753 g_datalist_set_data_full (&proxy->priv->qdata, "as", (gpointer) value, g_free);
4754 g_variant_unref (variant);
4759 static const gchar *const *
4760 foo_igen_bar_proxy_get_aay (FooiGenBar *object)
4762 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4764 const gchar *const *value = NULL;
4765 value = g_datalist_get_data (&proxy->priv->qdata, "aay");
4768 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "aay");
4769 if (variant != NULL)
4771 value = g_variant_get_bytestring_array (variant, NULL);
4772 g_datalist_set_data_full (&proxy->priv->qdata, "aay", (gpointer) value, g_free);
4773 g_variant_unref (variant);
4778 static const gchar *const *
4779 foo_igen_bar_proxy_get_ao (FooiGenBar *object)
4781 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4783 const gchar *const *value = NULL;
4784 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ao");
4785 if (variant != NULL)
4787 value = g_variant_get_objv (variant, NULL);
4788 g_variant_unref (variant);
4794 foo_igen_bar_proxy_get_ag (FooiGenBar *object)
4796 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4798 GVariant *value = NULL;
4799 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ag");
4801 if (variant != NULL)
4802 g_variant_unref (variant);
4806 static const gchar *
4807 foo_igen_bar_proxy_get_finally_normal_name (FooiGenBar *object)
4809 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4811 const gchar *value = NULL;
4812 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "FinallyNormalName");
4813 if (variant != NULL)
4815 value = g_variant_get_string (variant, NULL);
4816 g_variant_unref (variant);
4821 static const gchar *
4822 foo_igen_bar_proxy_get_readonly_property (FooiGenBar *object)
4824 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4826 const gchar *value = NULL;
4827 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ReadonlyProperty");
4828 if (variant != NULL)
4830 value = g_variant_get_string (variant, NULL);
4831 g_variant_unref (variant);
4836 static const gchar *
4837 foo_igen_bar_proxy_get_writeonly_property (FooiGenBar *object)
4839 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4841 const gchar *value = NULL;
4842 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "WriteonlyProperty");
4843 if (variant != NULL)
4845 value = g_variant_get_string (variant, NULL);
4846 g_variant_unref (variant);
4852 foo_igen_bar_proxy_get_unset_i (FooiGenBar *object)
4854 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4857 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_i");
4858 if (variant != NULL)
4860 value = g_variant_get_int32 (variant);
4861 g_variant_unref (variant);
4867 foo_igen_bar_proxy_get_unset_d (FooiGenBar *object)
4869 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4872 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_d");
4873 if (variant != NULL)
4875 value = g_variant_get_double (variant);
4876 g_variant_unref (variant);
4881 static const gchar *
4882 foo_igen_bar_proxy_get_unset_s (FooiGenBar *object)
4884 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4886 const gchar *value = NULL;
4887 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_s");
4888 if (variant != NULL)
4890 value = g_variant_get_string (variant, NULL);
4891 g_variant_unref (variant);
4896 static const gchar *
4897 foo_igen_bar_proxy_get_unset_o (FooiGenBar *object)
4899 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4901 const gchar *value = NULL;
4902 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_o");
4903 if (variant != NULL)
4905 value = g_variant_get_string (variant, NULL);
4906 g_variant_unref (variant);
4911 static const gchar *
4912 foo_igen_bar_proxy_get_unset_g (FooiGenBar *object)
4914 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4916 const gchar *value = NULL;
4917 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_g");
4918 if (variant != NULL)
4920 value = g_variant_get_string (variant, NULL);
4921 g_variant_unref (variant);
4926 static const gchar *
4927 foo_igen_bar_proxy_get_unset_ay (FooiGenBar *object)
4929 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4931 const gchar *value = NULL;
4932 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_ay");
4933 if (variant != NULL)
4935 value = g_variant_get_bytestring (variant);
4936 g_variant_unref (variant);
4941 static const gchar *const *
4942 foo_igen_bar_proxy_get_unset_as (FooiGenBar *object)
4944 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4946 const gchar *const *value = NULL;
4947 value = g_datalist_get_data (&proxy->priv->qdata, "unset_as");
4950 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_as");
4951 if (variant != NULL)
4953 value = g_variant_get_strv (variant, NULL);
4954 g_datalist_set_data_full (&proxy->priv->qdata, "unset_as", (gpointer) value, g_free);
4955 g_variant_unref (variant);
4960 static const gchar *const *
4961 foo_igen_bar_proxy_get_unset_ao (FooiGenBar *object)
4963 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4965 const gchar *const *value = NULL;
4966 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_ao");
4967 if (variant != NULL)
4969 value = g_variant_get_objv (variant, NULL);
4970 g_variant_unref (variant);
4976 foo_igen_bar_proxy_get_unset_ag (FooiGenBar *object)
4978 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4980 GVariant *value = NULL;
4981 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_ag");
4983 if (variant != NULL)
4984 g_variant_unref (variant);
4989 foo_igen_bar_proxy_get_unset_struct (FooiGenBar *object)
4991 FooiGenBarProxy *proxy = FOO_IGEN_BAR_PROXY (object);
4993 GVariant *value = NULL;
4994 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unset_struct");
4996 if (variant != NULL)
4997 g_variant_unref (variant);
5002 foo_igen_bar_proxy_init (FooiGenBarProxy *proxy)
5004 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_BAR_PROXY, FooiGenBarProxyPrivate);
5005 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_bar_interface_info ());
5009 foo_igen_bar_proxy_class_init (FooiGenBarProxyClass *klass)
5011 GObjectClass *gobject_class;
5012 GDBusProxyClass *proxy_class;
5014 g_type_class_add_private (klass, sizeof (FooiGenBarProxyPrivate));
5016 gobject_class = G_OBJECT_CLASS (klass);
5017 gobject_class->finalize = foo_igen_bar_proxy_finalize;
5018 gobject_class->get_property = foo_igen_bar_proxy_get_property;
5019 gobject_class->set_property = foo_igen_bar_proxy_set_property;
5021 proxy_class = G_DBUS_PROXY_CLASS (klass);
5022 proxy_class->g_signal = foo_igen_bar_proxy_g_signal;
5023 proxy_class->g_properties_changed = foo_igen_bar_proxy_g_properties_changed;
5026 foo_igen_bar_override_properties (gobject_class, 1);
5030 foo_igen_bar_proxy_iface_init (FooiGenBarIface *iface)
5032 iface->get_y = foo_igen_bar_proxy_get_y;
5033 iface->get_b = foo_igen_bar_proxy_get_b;
5034 iface->get_n = foo_igen_bar_proxy_get_n;
5035 iface->get_q = foo_igen_bar_proxy_get_q;
5036 iface->get_i = foo_igen_bar_proxy_get_i;
5037 iface->get_u = foo_igen_bar_proxy_get_u;
5038 iface->get_x = foo_igen_bar_proxy_get_x;
5039 iface->get_t = foo_igen_bar_proxy_get_t;
5040 iface->get_d = foo_igen_bar_proxy_get_d;
5041 iface->get_s = foo_igen_bar_proxy_get_s;
5042 iface->get_o = foo_igen_bar_proxy_get_o;
5043 iface->get_g = foo_igen_bar_proxy_get_g;
5044 iface->get_ay = foo_igen_bar_proxy_get_ay;
5045 iface->get_as = foo_igen_bar_proxy_get_as;
5046 iface->get_aay = foo_igen_bar_proxy_get_aay;
5047 iface->get_ao = foo_igen_bar_proxy_get_ao;
5048 iface->get_ag = foo_igen_bar_proxy_get_ag;
5049 iface->get_finally_normal_name = foo_igen_bar_proxy_get_finally_normal_name;
5050 iface->get_readonly_property = foo_igen_bar_proxy_get_readonly_property;
5051 iface->get_writeonly_property = foo_igen_bar_proxy_get_writeonly_property;
5052 iface->get_unset_i = foo_igen_bar_proxy_get_unset_i;
5053 iface->get_unset_d = foo_igen_bar_proxy_get_unset_d;
5054 iface->get_unset_s = foo_igen_bar_proxy_get_unset_s;
5055 iface->get_unset_o = foo_igen_bar_proxy_get_unset_o;
5056 iface->get_unset_g = foo_igen_bar_proxy_get_unset_g;
5057 iface->get_unset_ay = foo_igen_bar_proxy_get_unset_ay;
5058 iface->get_unset_as = foo_igen_bar_proxy_get_unset_as;
5059 iface->get_unset_ao = foo_igen_bar_proxy_get_unset_ao;
5060 iface->get_unset_ag = foo_igen_bar_proxy_get_unset_ag;
5061 iface->get_unset_struct = foo_igen_bar_proxy_get_unset_struct;
5065 * foo_igen_bar_proxy_new:
5066 * @connection: A #GDBusConnection.
5067 * @flags: Flags from the #GDBusProxyFlags enumeration.
5068 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
5069 * @object_path: An object path.
5070 * @cancellable: (allow-none): A #GCancellable or %NULL.
5071 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
5072 * @user_data: User data to pass to @callback.
5074 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link>. See g_dbus_proxy_new() for more details.
5076 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
5077 * You can then call foo_igen_bar_proxy_new_finish() to get the result of the operation.
5079 * See foo_igen_bar_proxy_new_sync() for the synchronous, blocking version of this constructor.
5082 foo_igen_bar_proxy_new (
5083 GDBusConnection *connection,
5084 GDBusProxyFlags flags,
5086 const gchar *object_path,
5087 GCancellable *cancellable,
5088 GAsyncReadyCallback callback,
5091 g_async_initable_new_async (FOO_IGEN_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);
5095 * foo_igen_bar_proxy_new_finish:
5096 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_proxy_new().
5097 * @error: Return location for error or %NULL
5099 * Finishes an operation started with foo_igen_bar_proxy_new().
5101 * Returns: (transfer full) (type FooiGenBarProxy): The constructed proxy object or %NULL if @error is set.
5104 foo_igen_bar_proxy_new_finish (
5109 GObject *source_object;
5110 source_object = g_async_result_get_source_object (res);
5111 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
5112 g_object_unref (source_object);
5114 return FOO_IGEN_BAR (ret);
5120 * foo_igen_bar_proxy_new_sync:
5121 * @connection: A #GDBusConnection.
5122 * @flags: Flags from the #GDBusProxyFlags enumeration.
5123 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
5124 * @object_path: An object path.
5125 * @cancellable: (allow-none): A #GCancellable or %NULL.
5126 * @error: Return location for error or %NULL
5128 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link>. See g_dbus_proxy_new_sync() for more details.
5130 * The calling thread is blocked until a reply is received.
5132 * See foo_igen_bar_proxy_new() for the asynchronous version of this constructor.
5134 * Returns: (transfer full) (type FooiGenBarProxy): The constructed proxy object or %NULL if @error is set.
5137 foo_igen_bar_proxy_new_sync (
5138 GDBusConnection *connection,
5139 GDBusProxyFlags flags,
5141 const gchar *object_path,
5142 GCancellable *cancellable,
5146 ret = g_initable_new (FOO_IGEN_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);
5148 return FOO_IGEN_BAR (ret);
5155 * foo_igen_bar_proxy_new_for_bus:
5156 * @bus_type: A #GBusType.
5157 * @flags: Flags from the #GDBusProxyFlags enumeration.
5158 * @name: A bus name (well-known or unique).
5159 * @object_path: An object path.
5160 * @cancellable: (allow-none): A #GCancellable or %NULL.
5161 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
5162 * @user_data: User data to pass to @callback.
5164 * Like foo_igen_bar_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
5166 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
5167 * You can then call foo_igen_bar_proxy_new_for_bus_finish() to get the result of the operation.
5169 * See foo_igen_bar_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
5172 foo_igen_bar_proxy_new_for_bus (
5174 GDBusProxyFlags flags,
5176 const gchar *object_path,
5177 GCancellable *cancellable,
5178 GAsyncReadyCallback callback,
5181 g_async_initable_new_async (FOO_IGEN_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);
5185 * foo_igen_bar_proxy_new_for_bus_finish:
5186 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_proxy_new_for_bus().
5187 * @error: Return location for error or %NULL
5189 * Finishes an operation started with foo_igen_bar_proxy_new_for_bus().
5191 * Returns: (transfer full) (type FooiGenBarProxy): The constructed proxy object or %NULL if @error is set.
5194 foo_igen_bar_proxy_new_for_bus_finish (
5199 GObject *source_object;
5200 source_object = g_async_result_get_source_object (res);
5201 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
5202 g_object_unref (source_object);
5204 return FOO_IGEN_BAR (ret);
5210 * foo_igen_bar_proxy_new_for_bus_sync:
5211 * @bus_type: A #GBusType.
5212 * @flags: Flags from the #GDBusProxyFlags enumeration.
5213 * @name: A bus name (well-known or unique).
5214 * @object_path: An object path.
5215 * @cancellable: (allow-none): A #GCancellable or %NULL.
5216 * @error: Return location for error or %NULL
5218 * Like foo_igen_bar_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
5220 * The calling thread is blocked until a reply is received.
5222 * See foo_igen_bar_proxy_new_for_bus() for the asynchronous version of this constructor.
5224 * Returns: (transfer full) (type FooiGenBarProxy): The constructed proxy object or %NULL if @error is set.
5227 foo_igen_bar_proxy_new_for_bus_sync (
5229 GDBusProxyFlags flags,
5231 const gchar *object_path,
5232 GCancellable *cancellable,
5236 ret = g_initable_new (FOO_IGEN_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);
5238 return FOO_IGEN_BAR (ret);
5244 /* ------------------------------------------------------------------------ */
5247 * FooiGenBarSkeleton:
5249 * The #FooiGenBarSkeleton structure contains only private data and should only be accessed using the provided API.
5253 * FooiGenBarSkeletonClass:
5254 * @parent_class: The parent class.
5256 * Class structure for #FooiGenBarSkeleton.
5259 struct _FooiGenBarSkeletonPrivate
5262 GList *changed_properties;
5263 GSource *changed_properties_idle_source;
5264 GMainContext *context;
5269 _foo_igen_bar_skeleton_handle_method_call (
5270 GDBusConnection *connection,
5271 const gchar *sender,
5272 const gchar *object_path,
5273 const gchar *interface_name,
5274 const gchar *method_name,
5275 GVariant *parameters,
5276 GDBusMethodInvocation *invocation,
5279 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (user_data);
5280 _ExtendedGDBusMethodInfo *info;
5288 GValue return_value = G_VALUE_INIT;
5289 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
5290 g_assert (info != NULL);
5291 num_params = g_variant_n_children (parameters);
5292 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
5294 g_value_init (¶mv[n], FOO_IGEN_TYPE_BAR);
5295 g_value_set_object (¶mv[n++], skeleton);
5296 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
5297 g_value_set_object (¶mv[n++], invocation);
5298 if (info->pass_fdlist)
5301 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
5302 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
5304 g_assert_not_reached ();
5307 g_variant_iter_init (&iter, parameters);
5308 while ((child = g_variant_iter_next_value (&iter)) != NULL)
5310 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
5311 if (arg_info->use_gvariant)
5313 g_value_init (¶mv[n], G_TYPE_VARIANT);
5314 g_value_set_variant (¶mv[n], child);
5318 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
5319 g_variant_unref (child);
5321 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAR);
5322 g_value_init (&return_value, G_TYPE_BOOLEAN);
5323 g_signal_emitv (paramv, signal_id, 0, &return_value);
5324 if (!g_value_get_boolean (&return_value))
5325 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
5326 g_value_unset (&return_value);
5327 for (n = 0; n < num_params + num_extra; n++)
5328 g_value_unset (¶mv[n]);
5333 _foo_igen_bar_skeleton_handle_get_property (
5334 GDBusConnection *connection,
5335 const gchar *sender,
5336 const gchar *object_path,
5337 const gchar *interface_name,
5338 const gchar *property_name,
5342 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (user_data);
5343 GValue value = G_VALUE_INIT;
5345 _ExtendedGDBusPropertyInfo *info;
5348 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_interface_info, property_name);
5349 g_assert (info != NULL);
5350 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
5353 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
5357 g_value_init (&value, pspec->value_type);
5358 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
5359 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
5360 g_value_unset (&value);
5366 _foo_igen_bar_skeleton_handle_set_property (
5367 GDBusConnection *connection,
5368 const gchar *sender,
5369 const gchar *object_path,
5370 const gchar *interface_name,
5371 const gchar *property_name,
5376 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (user_data);
5377 GValue value = G_VALUE_INIT;
5379 _ExtendedGDBusPropertyInfo *info;
5382 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_interface_info, property_name);
5383 g_assert (info != NULL);
5384 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
5387 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
5391 if (info->use_gvariant)
5392 g_value_set_variant (&value, variant);
5394 g_dbus_gvariant_to_gvalue (variant, &value);
5395 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
5396 g_value_unset (&value);
5402 static const GDBusInterfaceVTable _foo_igen_bar_skeleton_vtable =
5404 _foo_igen_bar_skeleton_handle_method_call,
5405 _foo_igen_bar_skeleton_handle_get_property,
5406 _foo_igen_bar_skeleton_handle_set_property
5409 static GDBusInterfaceInfo *
5410 foo_igen_bar_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
5412 return foo_igen_bar_interface_info ();
5415 static GDBusInterfaceVTable *
5416 foo_igen_bar_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
5418 return (GDBusInterfaceVTable *) &_foo_igen_bar_skeleton_vtable;
5422 foo_igen_bar_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
5424 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (_skeleton);
5426 GVariantBuilder builder;
5428 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
5429 if (_foo_igen_bar_interface_info.parent_struct.properties == NULL)
5431 for (n = 0; _foo_igen_bar_interface_info.parent_struct.properties[n] != NULL; n++)
5433 GDBusPropertyInfo *info = _foo_igen_bar_interface_info.parent_struct.properties[n];
5434 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
5437 value = _foo_igen_bar_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Bar", info->name, NULL, skeleton);
5440 g_variant_take_ref (value);
5441 g_variant_builder_add (&builder, "{sv}", info->name, value);
5442 g_variant_unref (value);
5447 return g_variant_builder_end (&builder);
5450 static gboolean _foo_igen_bar_emit_changed (gpointer user_data);
5453 foo_igen_bar_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
5455 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (_skeleton);
5456 gboolean emit_changed = FALSE;
5458 g_mutex_lock (&skeleton->priv->lock);
5459 if (skeleton->priv->changed_properties_idle_source != NULL)
5461 g_source_destroy (skeleton->priv->changed_properties_idle_source);
5462 skeleton->priv->changed_properties_idle_source = NULL;
5463 emit_changed = TRUE;
5465 g_mutex_unlock (&skeleton->priv->lock);
5468 _foo_igen_bar_emit_changed (skeleton);
5472 _foo_igen_bar_on_signal_test_signal (
5475 const gchar *const *arg_array_of_strings,
5476 const gchar *const *arg_array_of_bytestrings,
5477 GVariant *arg_dict_s_to_pairs)
5479 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5481 GList *connections, *l;
5482 GVariant *signal_variant;
5483 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
5485 signal_variant = g_variant_ref_sink (g_variant_new ("(i^as^aay@a{s(ii)})",
5487 arg_array_of_strings,
5488 arg_array_of_bytestrings,
5489 arg_dict_s_to_pairs));
5490 for (l = connections; l != NULL; l = l->next)
5492 GDBusConnection *connection = l->data;
5493 g_dbus_connection_emit_signal (connection,
5494 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Bar", "TestSignal",
5495 signal_variant, NULL);
5497 g_variant_unref (signal_variant);
5498 g_list_free_full (connections, g_object_unref);
5502 _foo_igen_bar_on_signal_another_signal (
5504 const gchar *arg_word)
5506 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5508 GList *connections, *l;
5509 GVariant *signal_variant;
5510 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
5512 signal_variant = g_variant_ref_sink (g_variant_new ("(s)",
5514 for (l = connections; l != NULL; l = l->next)
5516 GDBusConnection *connection = l->data;
5517 g_dbus_connection_emit_signal (connection,
5518 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Bar", "AnotherSignal",
5519 signal_variant, NULL);
5521 g_variant_unref (signal_variant);
5522 g_list_free_full (connections, g_object_unref);
5525 static void foo_igen_bar_skeleton_iface_init (FooiGenBarIface *iface);
5526 G_DEFINE_TYPE_WITH_CODE (FooiGenBarSkeleton, foo_igen_bar_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
5527 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAR, foo_igen_bar_skeleton_iface_init));
5530 foo_igen_bar_skeleton_finalize (GObject *object)
5532 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5534 for (n = 0; n < 30; n++)
5535 g_value_unset (&skeleton->priv->properties[n]);
5536 g_free (skeleton->priv->properties);
5537 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
5538 if (skeleton->priv->changed_properties_idle_source != NULL)
5539 g_source_destroy (skeleton->priv->changed_properties_idle_source);
5540 g_main_context_unref (skeleton->priv->context);
5541 g_mutex_clear (&skeleton->priv->lock);
5542 G_OBJECT_CLASS (foo_igen_bar_skeleton_parent_class)->finalize (object);
5546 foo_igen_bar_skeleton_get_property (GObject *object,
5551 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5552 g_assert (prop_id != 0 && prop_id - 1 < 30);
5553 g_mutex_lock (&skeleton->priv->lock);
5554 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
5555 g_mutex_unlock (&skeleton->priv->lock);
5559 _foo_igen_bar_emit_changed (gpointer user_data)
5561 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (user_data);
5563 GVariantBuilder builder;
5564 GVariantBuilder invalidated_builder;
5567 g_mutex_lock (&skeleton->priv->lock);
5568 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
5569 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
5570 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
5572 ChangedProperty *cp = l->data;
5574 const GValue *cur_value;
5576 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
5577 if (!_g_value_equal (cur_value, &cp->orig_value))
5579 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
5580 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
5581 g_variant_unref (variant);
5585 if (num_changes > 0)
5587 GList *connections, *l;
5588 GVariant *signal_variant;
5589 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.project.Bar",
5590 &builder, &invalidated_builder));
5591 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
5592 for (l = connections; l != NULL; l = l->next)
5594 GDBusConnection *connection = l->data;
5596 g_dbus_connection_emit_signal (connection,
5597 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
5598 "org.freedesktop.DBus.Properties",
5599 "PropertiesChanged",
5603 g_variant_unref (signal_variant);
5604 g_list_free_full (connections, g_object_unref);
5608 g_variant_builder_clear (&builder);
5609 g_variant_builder_clear (&invalidated_builder);
5611 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
5612 skeleton->priv->changed_properties = NULL;
5613 skeleton->priv->changed_properties_idle_source = NULL;
5614 g_mutex_unlock (&skeleton->priv->lock);
5619 _foo_igen_bar_schedule_emit_changed (FooiGenBarSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
5621 ChangedProperty *cp;
5624 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
5626 ChangedProperty *i_cp = l->data;
5627 if (i_cp->info == info)
5635 cp = g_new0 (ChangedProperty, 1);
5636 cp->prop_id = prop_id;
5638 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
5639 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
5640 g_value_copy (orig_value, &cp->orig_value);
5645 foo_igen_bar_skeleton_notify (GObject *object,
5648 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5649 g_mutex_lock (&skeleton->priv->lock);
5650 if (skeleton->priv->changed_properties != NULL &&
5651 skeleton->priv->changed_properties_idle_source == NULL)
5653 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
5654 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
5655 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_bar_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
5656 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
5657 g_source_unref (skeleton->priv->changed_properties_idle_source);
5659 g_mutex_unlock (&skeleton->priv->lock);
5663 foo_igen_bar_skeleton_set_property (GObject *object,
5665 const GValue *value,
5668 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5669 g_assert (prop_id != 0 && prop_id - 1 < 30);
5670 g_mutex_lock (&skeleton->priv->lock);
5671 g_object_freeze_notify (object);
5672 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
5674 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
5675 _foo_igen_bar_schedule_emit_changed (skeleton, _foo_igen_bar_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
5676 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
5677 g_object_notify_by_pspec (object, pspec);
5679 g_mutex_unlock (&skeleton->priv->lock);
5680 g_object_thaw_notify (object);
5684 foo_igen_bar_skeleton_init (FooiGenBarSkeleton *skeleton)
5686 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_BAR_SKELETON, FooiGenBarSkeletonPrivate);
5687 g_mutex_init (&skeleton->priv->lock);
5688 skeleton->priv->context = g_main_context_ref_thread_default ();
5689 skeleton->priv->properties = g_new0 (GValue, 30);
5690 g_value_init (&skeleton->priv->properties[0], G_TYPE_UCHAR);
5691 g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN);
5692 g_value_init (&skeleton->priv->properties[2], G_TYPE_INT);
5693 g_value_init (&skeleton->priv->properties[3], G_TYPE_UINT);
5694 g_value_init (&skeleton->priv->properties[4], G_TYPE_INT);
5695 g_value_init (&skeleton->priv->properties[5], G_TYPE_UINT);
5696 g_value_init (&skeleton->priv->properties[6], G_TYPE_INT64);
5697 g_value_init (&skeleton->priv->properties[7], G_TYPE_UINT64);
5698 g_value_init (&skeleton->priv->properties[8], G_TYPE_DOUBLE);
5699 g_value_init (&skeleton->priv->properties[9], G_TYPE_STRING);
5700 g_value_init (&skeleton->priv->properties[10], G_TYPE_STRING);
5701 g_value_init (&skeleton->priv->properties[11], G_TYPE_STRING);
5702 g_value_init (&skeleton->priv->properties[12], G_TYPE_STRING);
5703 g_value_init (&skeleton->priv->properties[13], G_TYPE_STRV);
5704 g_value_init (&skeleton->priv->properties[14], G_TYPE_STRV);
5705 g_value_init (&skeleton->priv->properties[15], G_TYPE_STRV);
5706 g_value_init (&skeleton->priv->properties[16], G_TYPE_VARIANT);
5707 g_value_init (&skeleton->priv->properties[17], G_TYPE_STRING);
5708 g_value_init (&skeleton->priv->properties[18], G_TYPE_STRING);
5709 g_value_init (&skeleton->priv->properties[19], G_TYPE_STRING);
5710 g_value_init (&skeleton->priv->properties[20], G_TYPE_INT);
5711 g_value_init (&skeleton->priv->properties[21], G_TYPE_DOUBLE);
5712 g_value_init (&skeleton->priv->properties[22], G_TYPE_STRING);
5713 g_value_init (&skeleton->priv->properties[23], G_TYPE_STRING);
5714 g_value_init (&skeleton->priv->properties[24], G_TYPE_STRING);
5715 g_value_init (&skeleton->priv->properties[25], G_TYPE_STRING);
5716 g_value_init (&skeleton->priv->properties[26], G_TYPE_STRV);
5717 g_value_init (&skeleton->priv->properties[27], G_TYPE_STRV);
5718 g_value_init (&skeleton->priv->properties[28], G_TYPE_VARIANT);
5719 g_value_init (&skeleton->priv->properties[29], G_TYPE_VARIANT);
5723 foo_igen_bar_skeleton_get_y (FooiGenBar *object)
5725 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5727 g_mutex_lock (&skeleton->priv->lock);
5728 value = g_value_get_uchar (&(skeleton->priv->properties[0]));
5729 g_mutex_unlock (&skeleton->priv->lock);
5734 foo_igen_bar_skeleton_get_b (FooiGenBar *object)
5736 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5738 g_mutex_lock (&skeleton->priv->lock);
5739 value = g_value_get_boolean (&(skeleton->priv->properties[1]));
5740 g_mutex_unlock (&skeleton->priv->lock);
5745 foo_igen_bar_skeleton_get_n (FooiGenBar *object)
5747 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5749 g_mutex_lock (&skeleton->priv->lock);
5750 value = g_value_get_int (&(skeleton->priv->properties[2]));
5751 g_mutex_unlock (&skeleton->priv->lock);
5756 foo_igen_bar_skeleton_get_q (FooiGenBar *object)
5758 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5760 g_mutex_lock (&skeleton->priv->lock);
5761 value = g_value_get_uint (&(skeleton->priv->properties[3]));
5762 g_mutex_unlock (&skeleton->priv->lock);
5767 foo_igen_bar_skeleton_get_i (FooiGenBar *object)
5769 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5771 g_mutex_lock (&skeleton->priv->lock);
5772 value = g_value_get_int (&(skeleton->priv->properties[4]));
5773 g_mutex_unlock (&skeleton->priv->lock);
5778 foo_igen_bar_skeleton_get_u (FooiGenBar *object)
5780 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5782 g_mutex_lock (&skeleton->priv->lock);
5783 value = g_value_get_uint (&(skeleton->priv->properties[5]));
5784 g_mutex_unlock (&skeleton->priv->lock);
5789 foo_igen_bar_skeleton_get_x (FooiGenBar *object)
5791 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5793 g_mutex_lock (&skeleton->priv->lock);
5794 value = g_value_get_int64 (&(skeleton->priv->properties[6]));
5795 g_mutex_unlock (&skeleton->priv->lock);
5800 foo_igen_bar_skeleton_get_t (FooiGenBar *object)
5802 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5804 g_mutex_lock (&skeleton->priv->lock);
5805 value = g_value_get_uint64 (&(skeleton->priv->properties[7]));
5806 g_mutex_unlock (&skeleton->priv->lock);
5811 foo_igen_bar_skeleton_get_d (FooiGenBar *object)
5813 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5815 g_mutex_lock (&skeleton->priv->lock);
5816 value = g_value_get_double (&(skeleton->priv->properties[8]));
5817 g_mutex_unlock (&skeleton->priv->lock);
5821 static const gchar *
5822 foo_igen_bar_skeleton_get_s (FooiGenBar *object)
5824 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5826 g_mutex_lock (&skeleton->priv->lock);
5827 value = g_value_get_string (&(skeleton->priv->properties[9]));
5828 g_mutex_unlock (&skeleton->priv->lock);
5832 static const gchar *
5833 foo_igen_bar_skeleton_get_o (FooiGenBar *object)
5835 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5837 g_mutex_lock (&skeleton->priv->lock);
5838 value = g_value_get_string (&(skeleton->priv->properties[10]));
5839 g_mutex_unlock (&skeleton->priv->lock);
5843 static const gchar *
5844 foo_igen_bar_skeleton_get_g (FooiGenBar *object)
5846 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5848 g_mutex_lock (&skeleton->priv->lock);
5849 value = g_value_get_string (&(skeleton->priv->properties[11]));
5850 g_mutex_unlock (&skeleton->priv->lock);
5854 static const gchar *
5855 foo_igen_bar_skeleton_get_ay (FooiGenBar *object)
5857 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5859 g_mutex_lock (&skeleton->priv->lock);
5860 value = g_value_get_string (&(skeleton->priv->properties[12]));
5861 g_mutex_unlock (&skeleton->priv->lock);
5865 static const gchar *const *
5866 foo_igen_bar_skeleton_get_as (FooiGenBar *object)
5868 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5869 const gchar *const *value;
5870 g_mutex_lock (&skeleton->priv->lock);
5871 value = g_value_get_boxed (&(skeleton->priv->properties[13]));
5872 g_mutex_unlock (&skeleton->priv->lock);
5876 static const gchar *const *
5877 foo_igen_bar_skeleton_get_aay (FooiGenBar *object)
5879 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5880 const gchar *const *value;
5881 g_mutex_lock (&skeleton->priv->lock);
5882 value = g_value_get_boxed (&(skeleton->priv->properties[14]));
5883 g_mutex_unlock (&skeleton->priv->lock);
5887 static const gchar *const *
5888 foo_igen_bar_skeleton_get_ao (FooiGenBar *object)
5890 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5891 const gchar *const *value;
5892 g_mutex_lock (&skeleton->priv->lock);
5893 value = g_value_get_boxed (&(skeleton->priv->properties[15]));
5894 g_mutex_unlock (&skeleton->priv->lock);
5899 foo_igen_bar_skeleton_get_ag (FooiGenBar *object)
5901 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5903 g_mutex_lock (&skeleton->priv->lock);
5904 value = g_value_get_variant (&(skeleton->priv->properties[16]));
5905 g_mutex_unlock (&skeleton->priv->lock);
5909 static const gchar *
5910 foo_igen_bar_skeleton_get_finally_normal_name (FooiGenBar *object)
5912 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5914 g_mutex_lock (&skeleton->priv->lock);
5915 value = g_value_get_string (&(skeleton->priv->properties[17]));
5916 g_mutex_unlock (&skeleton->priv->lock);
5920 static const gchar *
5921 foo_igen_bar_skeleton_get_readonly_property (FooiGenBar *object)
5923 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5925 g_mutex_lock (&skeleton->priv->lock);
5926 value = g_value_get_string (&(skeleton->priv->properties[18]));
5927 g_mutex_unlock (&skeleton->priv->lock);
5931 static const gchar *
5932 foo_igen_bar_skeleton_get_writeonly_property (FooiGenBar *object)
5934 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5936 g_mutex_lock (&skeleton->priv->lock);
5937 value = g_value_get_string (&(skeleton->priv->properties[19]));
5938 g_mutex_unlock (&skeleton->priv->lock);
5943 foo_igen_bar_skeleton_get_unset_i (FooiGenBar *object)
5945 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5947 g_mutex_lock (&skeleton->priv->lock);
5948 value = g_value_get_int (&(skeleton->priv->properties[20]));
5949 g_mutex_unlock (&skeleton->priv->lock);
5954 foo_igen_bar_skeleton_get_unset_d (FooiGenBar *object)
5956 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5958 g_mutex_lock (&skeleton->priv->lock);
5959 value = g_value_get_double (&(skeleton->priv->properties[21]));
5960 g_mutex_unlock (&skeleton->priv->lock);
5964 static const gchar *
5965 foo_igen_bar_skeleton_get_unset_s (FooiGenBar *object)
5967 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5969 g_mutex_lock (&skeleton->priv->lock);
5970 value = g_value_get_string (&(skeleton->priv->properties[22]));
5971 g_mutex_unlock (&skeleton->priv->lock);
5975 static const gchar *
5976 foo_igen_bar_skeleton_get_unset_o (FooiGenBar *object)
5978 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5980 g_mutex_lock (&skeleton->priv->lock);
5981 value = g_value_get_string (&(skeleton->priv->properties[23]));
5982 g_mutex_unlock (&skeleton->priv->lock);
5986 static const gchar *
5987 foo_igen_bar_skeleton_get_unset_g (FooiGenBar *object)
5989 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
5991 g_mutex_lock (&skeleton->priv->lock);
5992 value = g_value_get_string (&(skeleton->priv->properties[24]));
5993 g_mutex_unlock (&skeleton->priv->lock);
5997 static const gchar *
5998 foo_igen_bar_skeleton_get_unset_ay (FooiGenBar *object)
6000 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
6002 g_mutex_lock (&skeleton->priv->lock);
6003 value = g_value_get_string (&(skeleton->priv->properties[25]));
6004 g_mutex_unlock (&skeleton->priv->lock);
6008 static const gchar *const *
6009 foo_igen_bar_skeleton_get_unset_as (FooiGenBar *object)
6011 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
6012 const gchar *const *value;
6013 g_mutex_lock (&skeleton->priv->lock);
6014 value = g_value_get_boxed (&(skeleton->priv->properties[26]));
6015 g_mutex_unlock (&skeleton->priv->lock);
6019 static const gchar *const *
6020 foo_igen_bar_skeleton_get_unset_ao (FooiGenBar *object)
6022 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
6023 const gchar *const *value;
6024 g_mutex_lock (&skeleton->priv->lock);
6025 value = g_value_get_boxed (&(skeleton->priv->properties[27]));
6026 g_mutex_unlock (&skeleton->priv->lock);
6031 foo_igen_bar_skeleton_get_unset_ag (FooiGenBar *object)
6033 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
6035 g_mutex_lock (&skeleton->priv->lock);
6036 value = g_value_get_variant (&(skeleton->priv->properties[28]));
6037 g_mutex_unlock (&skeleton->priv->lock);
6042 foo_igen_bar_skeleton_get_unset_struct (FooiGenBar *object)
6044 FooiGenBarSkeleton *skeleton = FOO_IGEN_BAR_SKELETON (object);
6046 g_mutex_lock (&skeleton->priv->lock);
6047 value = g_value_get_variant (&(skeleton->priv->properties[29]));
6048 g_mutex_unlock (&skeleton->priv->lock);
6053 foo_igen_bar_skeleton_class_init (FooiGenBarSkeletonClass *klass)
6055 GObjectClass *gobject_class;
6056 GDBusInterfaceSkeletonClass *skeleton_class;
6058 g_type_class_add_private (klass, sizeof (FooiGenBarSkeletonPrivate));
6060 gobject_class = G_OBJECT_CLASS (klass);
6061 gobject_class->finalize = foo_igen_bar_skeleton_finalize;
6062 gobject_class->get_property = foo_igen_bar_skeleton_get_property;
6063 gobject_class->set_property = foo_igen_bar_skeleton_set_property;
6064 gobject_class->notify = foo_igen_bar_skeleton_notify;
6067 foo_igen_bar_override_properties (gobject_class, 1);
6069 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
6070 skeleton_class->get_info = foo_igen_bar_skeleton_dbus_interface_get_info;
6071 skeleton_class->get_properties = foo_igen_bar_skeleton_dbus_interface_get_properties;
6072 skeleton_class->flush = foo_igen_bar_skeleton_dbus_interface_flush;
6073 skeleton_class->get_vtable = foo_igen_bar_skeleton_dbus_interface_get_vtable;
6077 foo_igen_bar_skeleton_iface_init (FooiGenBarIface *iface)
6079 iface->test_signal = _foo_igen_bar_on_signal_test_signal;
6080 iface->another_signal = _foo_igen_bar_on_signal_another_signal;
6081 iface->get_y = foo_igen_bar_skeleton_get_y;
6082 iface->get_b = foo_igen_bar_skeleton_get_b;
6083 iface->get_n = foo_igen_bar_skeleton_get_n;
6084 iface->get_q = foo_igen_bar_skeleton_get_q;
6085 iface->get_i = foo_igen_bar_skeleton_get_i;
6086 iface->get_u = foo_igen_bar_skeleton_get_u;
6087 iface->get_x = foo_igen_bar_skeleton_get_x;
6088 iface->get_t = foo_igen_bar_skeleton_get_t;
6089 iface->get_d = foo_igen_bar_skeleton_get_d;
6090 iface->get_s = foo_igen_bar_skeleton_get_s;
6091 iface->get_o = foo_igen_bar_skeleton_get_o;
6092 iface->get_g = foo_igen_bar_skeleton_get_g;
6093 iface->get_ay = foo_igen_bar_skeleton_get_ay;
6094 iface->get_as = foo_igen_bar_skeleton_get_as;
6095 iface->get_aay = foo_igen_bar_skeleton_get_aay;
6096 iface->get_ao = foo_igen_bar_skeleton_get_ao;
6097 iface->get_ag = foo_igen_bar_skeleton_get_ag;
6098 iface->get_finally_normal_name = foo_igen_bar_skeleton_get_finally_normal_name;
6099 iface->get_readonly_property = foo_igen_bar_skeleton_get_readonly_property;
6100 iface->get_writeonly_property = foo_igen_bar_skeleton_get_writeonly_property;
6101 iface->get_unset_i = foo_igen_bar_skeleton_get_unset_i;
6102 iface->get_unset_d = foo_igen_bar_skeleton_get_unset_d;
6103 iface->get_unset_s = foo_igen_bar_skeleton_get_unset_s;
6104 iface->get_unset_o = foo_igen_bar_skeleton_get_unset_o;
6105 iface->get_unset_g = foo_igen_bar_skeleton_get_unset_g;
6106 iface->get_unset_ay = foo_igen_bar_skeleton_get_unset_ay;
6107 iface->get_unset_as = foo_igen_bar_skeleton_get_unset_as;
6108 iface->get_unset_ao = foo_igen_bar_skeleton_get_unset_ao;
6109 iface->get_unset_ag = foo_igen_bar_skeleton_get_unset_ag;
6110 iface->get_unset_struct = foo_igen_bar_skeleton_get_unset_struct;
6114 * foo_igen_bar_skeleton_new:
6116 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link>.
6118 * Returns: (transfer full) (type FooiGenBarSkeleton): The skeleton object.
6121 foo_igen_bar_skeleton_new (void)
6123 return FOO_IGEN_BAR (g_object_new (FOO_IGEN_TYPE_BAR_SKELETON, NULL));
6126 /* ------------------------------------------------------------------------
6127 * Code for interface org.project.Bar.Frobnicator
6128 * ------------------------------------------------------------------------
6132 * SECTION:FooiGenBarFrobnicator
6133 * @title: FooiGenBarFrobnicator
6134 * @short_description: Generated C code for the org.project.Bar.Frobnicator D-Bus interface
6136 * This section contains code for working with the <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link> D-Bus interface in C.
6139 /* ---- Introspection data for org.project.Bar.Frobnicator ---- */
6141 static const _ExtendedGDBusMethodInfo _foo_igen_bar_frobnicator_method_info_random_method =
6150 "handle-random-method",
6154 static const _ExtendedGDBusMethodInfo * const _foo_igen_bar_frobnicator_method_info_pointers[] =
6156 &_foo_igen_bar_frobnicator_method_info_random_method,
6160 static const _ExtendedGDBusInterfaceInfo _foo_igen_bar_frobnicator_interface_info =
6164 "org.project.Bar.Frobnicator",
6165 (GDBusMethodInfo **) &_foo_igen_bar_frobnicator_method_info_pointers,
6175 * foo_igen_bar_frobnicator_interface_info:
6177 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link> D-Bus interface.
6179 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
6181 GDBusInterfaceInfo *
6182 foo_igen_bar_frobnicator_interface_info (void)
6184 return (GDBusInterfaceInfo *) &_foo_igen_bar_frobnicator_interface_info;
6188 * foo_igen_bar_frobnicator_override_properties:
6189 * @klass: The class structure for a #GObject<!-- -->-derived class.
6190 * @property_id_begin: The property id to assign to the first overridden property.
6192 * Overrides all #GObject properties in the #FooiGenBarFrobnicator interface for a concrete class.
6193 * The properties are overridden in the order they are defined.
6195 * Returns: The last property id.
6198 foo_igen_bar_frobnicator_override_properties (GObjectClass *klass, guint property_id_begin)
6200 return property_id_begin - 1;
6206 * FooiGenBarFrobnicator:
6208 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link>.
6212 * FooiGenBarFrobnicatorIface:
6213 * @parent_iface: The parent interface.
6214 * @handle_random_method: Handler for the #FooiGenBarFrobnicator::handle-random-method signal.
6216 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link>.
6220 foo_igen_bar_frobnicator_default_init (FooiGenBarFrobnicatorIface *iface)
6222 /* GObject signals for incoming D-Bus method calls: */
6224 * FooiGenBarFrobnicator::handle-random-method:
6225 * @object: A #FooiGenBarFrobnicator.
6226 * @invocation: A #GDBusMethodInvocation.
6228 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bar-Frobnicator.RandomMethod">RandomMethod()</link> D-Bus method.
6230 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bar_frobnicator_complete_random_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
6232 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
6234 g_signal_new ("handle-random-method",
6235 G_TYPE_FROM_INTERFACE (iface),
6237 G_STRUCT_OFFSET (FooiGenBarFrobnicatorIface, handle_random_method),
6238 g_signal_accumulator_true_handled,
6240 g_cclosure_marshal_generic,
6243 G_TYPE_DBUS_METHOD_INVOCATION);
6247 typedef FooiGenBarFrobnicatorIface FooiGenBarFrobnicatorInterface;
6248 G_DEFINE_INTERFACE (FooiGenBarFrobnicator, foo_igen_bar_frobnicator, G_TYPE_OBJECT);
6251 * foo_igen_bar_frobnicator_call_random_method:
6252 * @proxy: A #FooiGenBarFrobnicatorProxy.
6253 * @cancellable: (allow-none): A #GCancellable or %NULL.
6254 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
6255 * @user_data: User data to pass to @callback.
6257 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bar-Frobnicator.RandomMethod">RandomMethod()</link> D-Bus method on @proxy.
6258 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
6259 * You can then call foo_igen_bar_frobnicator_call_random_method_finish() to get the result of the operation.
6261 * See foo_igen_bar_frobnicator_call_random_method_sync() for the synchronous, blocking version of this method.
6264 foo_igen_bar_frobnicator_call_random_method (
6265 FooiGenBarFrobnicator *proxy,
6266 GCancellable *cancellable,
6267 GAsyncReadyCallback callback,
6270 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
6272 g_variant_new ("()"),
6273 G_DBUS_CALL_FLAGS_NONE,
6281 * foo_igen_bar_frobnicator_call_random_method_finish:
6282 * @proxy: A #FooiGenBarFrobnicatorProxy.
6283 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_frobnicator_call_random_method().
6284 * @error: Return location for error or %NULL.
6286 * Finishes an operation started with foo_igen_bar_frobnicator_call_random_method().
6288 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
6291 foo_igen_bar_frobnicator_call_random_method_finish (
6292 FooiGenBarFrobnicator *proxy,
6297 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
6300 g_variant_get (_ret,
6302 g_variant_unref (_ret);
6304 return _ret != NULL;
6308 * foo_igen_bar_frobnicator_call_random_method_sync:
6309 * @proxy: A #FooiGenBarFrobnicatorProxy.
6310 * @cancellable: (allow-none): A #GCancellable or %NULL.
6311 * @error: Return location for error or %NULL.
6313 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bar-Frobnicator.RandomMethod">RandomMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
6315 * See foo_igen_bar_frobnicator_call_random_method() for the asynchronous version of this method.
6317 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
6320 foo_igen_bar_frobnicator_call_random_method_sync (
6321 FooiGenBarFrobnicator *proxy,
6322 GCancellable *cancellable,
6326 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
6328 g_variant_new ("()"),
6329 G_DBUS_CALL_FLAGS_NONE,
6335 g_variant_get (_ret,
6337 g_variant_unref (_ret);
6339 return _ret != NULL;
6343 * foo_igen_bar_frobnicator_complete_random_method:
6344 * @object: A #FooiGenBarFrobnicator.
6345 * @invocation: (transfer full): A #GDBusMethodInvocation.
6347 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bar-Frobnicator.RandomMethod">RandomMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
6349 * This method will free @invocation, you cannot use it afterwards.
6352 foo_igen_bar_frobnicator_complete_random_method (
6353 FooiGenBarFrobnicator *object,
6354 GDBusMethodInvocation *invocation)
6356 g_dbus_method_invocation_return_value (invocation,
6357 g_variant_new ("()"));
6360 /* ------------------------------------------------------------------------ */
6363 * FooiGenBarFrobnicatorProxy:
6365 * The #FooiGenBarFrobnicatorProxy structure contains only private data and should only be accessed using the provided API.
6369 * FooiGenBarFrobnicatorProxyClass:
6370 * @parent_class: The parent class.
6372 * Class structure for #FooiGenBarFrobnicatorProxy.
6375 struct _FooiGenBarFrobnicatorProxyPrivate
6380 static void foo_igen_bar_frobnicator_proxy_iface_init (FooiGenBarFrobnicatorIface *iface);
6382 G_DEFINE_TYPE_WITH_CODE (FooiGenBarFrobnicatorProxy, foo_igen_bar_frobnicator_proxy, G_TYPE_DBUS_PROXY,
6383 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAR_FROBNICATOR, foo_igen_bar_frobnicator_proxy_iface_init));
6386 foo_igen_bar_frobnicator_proxy_finalize (GObject *object)
6388 FooiGenBarFrobnicatorProxy *proxy = FOO_IGEN_BAR_FROBNICATOR_PROXY (object);
6389 g_datalist_clear (&proxy->priv->qdata);
6390 G_OBJECT_CLASS (foo_igen_bar_frobnicator_proxy_parent_class)->finalize (object);
6394 foo_igen_bar_frobnicator_proxy_get_property (GObject *object,
6402 foo_igen_bar_frobnicator_proxy_set_property (GObject *object,
6404 const GValue *value,
6410 foo_igen_bar_frobnicator_proxy_g_signal (GDBusProxy *proxy,
6411 const gchar *sender_name,
6412 const gchar *signal_name,
6413 GVariant *parameters)
6415 _ExtendedGDBusSignalInfo *info;
6422 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_bar_frobnicator_interface_info, signal_name);
6425 num_params = g_variant_n_children (parameters);
6426 paramv = g_new0 (GValue, num_params + 1);
6427 g_value_init (¶mv[0], FOO_IGEN_TYPE_BAR_FROBNICATOR);
6428 g_value_set_object (¶mv[0], proxy);
6429 g_variant_iter_init (&iter, parameters);
6431 while ((child = g_variant_iter_next_value (&iter)) != NULL)
6433 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
6434 if (arg_info->use_gvariant)
6436 g_value_init (¶mv[n], G_TYPE_VARIANT);
6437 g_value_set_variant (¶mv[n], child);
6441 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
6442 g_variant_unref (child);
6444 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAR_FROBNICATOR);
6445 g_signal_emitv (paramv, signal_id, 0, NULL);
6446 for (n = 0; n < num_params + 1; n++)
6447 g_value_unset (¶mv[n]);
6452 foo_igen_bar_frobnicator_proxy_g_properties_changed (GDBusProxy *_proxy,
6453 GVariant *changed_properties,
6454 const gchar *const *invalidated_properties)
6456 FooiGenBarFrobnicatorProxy *proxy = FOO_IGEN_BAR_FROBNICATOR_PROXY (_proxy);
6460 _ExtendedGDBusPropertyInfo *info;
6461 g_variant_get (changed_properties, "a{sv}", &iter);
6462 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
6464 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_frobnicator_interface_info, key);
6465 g_datalist_remove_data (&proxy->priv->qdata, key);
6467 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
6469 g_variant_iter_free (iter);
6470 for (n = 0; invalidated_properties[n] != NULL; n++)
6472 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_frobnicator_interface_info, invalidated_properties[n]);
6473 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
6475 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
6480 foo_igen_bar_frobnicator_proxy_init (FooiGenBarFrobnicatorProxy *proxy)
6482 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_BAR_FROBNICATOR_PROXY, FooiGenBarFrobnicatorProxyPrivate);
6483 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_bar_frobnicator_interface_info ());
6487 foo_igen_bar_frobnicator_proxy_class_init (FooiGenBarFrobnicatorProxyClass *klass)
6489 GObjectClass *gobject_class;
6490 GDBusProxyClass *proxy_class;
6492 g_type_class_add_private (klass, sizeof (FooiGenBarFrobnicatorProxyPrivate));
6494 gobject_class = G_OBJECT_CLASS (klass);
6495 gobject_class->finalize = foo_igen_bar_frobnicator_proxy_finalize;
6496 gobject_class->get_property = foo_igen_bar_frobnicator_proxy_get_property;
6497 gobject_class->set_property = foo_igen_bar_frobnicator_proxy_set_property;
6499 proxy_class = G_DBUS_PROXY_CLASS (klass);
6500 proxy_class->g_signal = foo_igen_bar_frobnicator_proxy_g_signal;
6501 proxy_class->g_properties_changed = foo_igen_bar_frobnicator_proxy_g_properties_changed;
6506 foo_igen_bar_frobnicator_proxy_iface_init (FooiGenBarFrobnicatorIface *iface)
6511 * foo_igen_bar_frobnicator_proxy_new:
6512 * @connection: A #GDBusConnection.
6513 * @flags: Flags from the #GDBusProxyFlags enumeration.
6514 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
6515 * @object_path: An object path.
6516 * @cancellable: (allow-none): A #GCancellable or %NULL.
6517 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
6518 * @user_data: User data to pass to @callback.
6520 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link>. See g_dbus_proxy_new() for more details.
6522 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
6523 * You can then call foo_igen_bar_frobnicator_proxy_new_finish() to get the result of the operation.
6525 * See foo_igen_bar_frobnicator_proxy_new_sync() for the synchronous, blocking version of this constructor.
6528 foo_igen_bar_frobnicator_proxy_new (
6529 GDBusConnection *connection,
6530 GDBusProxyFlags flags,
6532 const gchar *object_path,
6533 GCancellable *cancellable,
6534 GAsyncReadyCallback callback,
6537 g_async_initable_new_async (FOO_IGEN_TYPE_BAR_FROBNICATOR_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.Frobnicator", NULL);
6541 * foo_igen_bar_frobnicator_proxy_new_finish:
6542 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_frobnicator_proxy_new().
6543 * @error: Return location for error or %NULL
6545 * Finishes an operation started with foo_igen_bar_frobnicator_proxy_new().
6547 * Returns: (transfer full) (type FooiGenBarFrobnicatorProxy): The constructed proxy object or %NULL if @error is set.
6549 FooiGenBarFrobnicator *
6550 foo_igen_bar_frobnicator_proxy_new_finish (
6555 GObject *source_object;
6556 source_object = g_async_result_get_source_object (res);
6557 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
6558 g_object_unref (source_object);
6560 return FOO_IGEN_BAR_FROBNICATOR (ret);
6566 * foo_igen_bar_frobnicator_proxy_new_sync:
6567 * @connection: A #GDBusConnection.
6568 * @flags: Flags from the #GDBusProxyFlags enumeration.
6569 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
6570 * @object_path: An object path.
6571 * @cancellable: (allow-none): A #GCancellable or %NULL.
6572 * @error: Return location for error or %NULL
6574 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link>. See g_dbus_proxy_new_sync() for more details.
6576 * The calling thread is blocked until a reply is received.
6578 * See foo_igen_bar_frobnicator_proxy_new() for the asynchronous version of this constructor.
6580 * Returns: (transfer full) (type FooiGenBarFrobnicatorProxy): The constructed proxy object or %NULL if @error is set.
6582 FooiGenBarFrobnicator *
6583 foo_igen_bar_frobnicator_proxy_new_sync (
6584 GDBusConnection *connection,
6585 GDBusProxyFlags flags,
6587 const gchar *object_path,
6588 GCancellable *cancellable,
6592 ret = g_initable_new (FOO_IGEN_TYPE_BAR_FROBNICATOR_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.project.Bar.Frobnicator", NULL);
6594 return FOO_IGEN_BAR_FROBNICATOR (ret);
6601 * foo_igen_bar_frobnicator_proxy_new_for_bus:
6602 * @bus_type: A #GBusType.
6603 * @flags: Flags from the #GDBusProxyFlags enumeration.
6604 * @name: A bus name (well-known or unique).
6605 * @object_path: An object path.
6606 * @cancellable: (allow-none): A #GCancellable or %NULL.
6607 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
6608 * @user_data: User data to pass to @callback.
6610 * Like foo_igen_bar_frobnicator_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
6612 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
6613 * You can then call foo_igen_bar_frobnicator_proxy_new_for_bus_finish() to get the result of the operation.
6615 * See foo_igen_bar_frobnicator_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
6618 foo_igen_bar_frobnicator_proxy_new_for_bus (
6620 GDBusProxyFlags flags,
6622 const gchar *object_path,
6623 GCancellable *cancellable,
6624 GAsyncReadyCallback callback,
6627 g_async_initable_new_async (FOO_IGEN_TYPE_BAR_FROBNICATOR_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.Frobnicator", NULL);
6631 * foo_igen_bar_frobnicator_proxy_new_for_bus_finish:
6632 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bar_frobnicator_proxy_new_for_bus().
6633 * @error: Return location for error or %NULL
6635 * Finishes an operation started with foo_igen_bar_frobnicator_proxy_new_for_bus().
6637 * Returns: (transfer full) (type FooiGenBarFrobnicatorProxy): The constructed proxy object or %NULL if @error is set.
6639 FooiGenBarFrobnicator *
6640 foo_igen_bar_frobnicator_proxy_new_for_bus_finish (
6645 GObject *source_object;
6646 source_object = g_async_result_get_source_object (res);
6647 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
6648 g_object_unref (source_object);
6650 return FOO_IGEN_BAR_FROBNICATOR (ret);
6656 * foo_igen_bar_frobnicator_proxy_new_for_bus_sync:
6657 * @bus_type: A #GBusType.
6658 * @flags: Flags from the #GDBusProxyFlags enumeration.
6659 * @name: A bus name (well-known or unique).
6660 * @object_path: An object path.
6661 * @cancellable: (allow-none): A #GCancellable or %NULL.
6662 * @error: Return location for error or %NULL
6664 * Like foo_igen_bar_frobnicator_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
6666 * The calling thread is blocked until a reply is received.
6668 * See foo_igen_bar_frobnicator_proxy_new_for_bus() for the asynchronous version of this constructor.
6670 * Returns: (transfer full) (type FooiGenBarFrobnicatorProxy): The constructed proxy object or %NULL if @error is set.
6672 FooiGenBarFrobnicator *
6673 foo_igen_bar_frobnicator_proxy_new_for_bus_sync (
6675 GDBusProxyFlags flags,
6677 const gchar *object_path,
6678 GCancellable *cancellable,
6682 ret = g_initable_new (FOO_IGEN_TYPE_BAR_FROBNICATOR_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.Frobnicator", NULL);
6684 return FOO_IGEN_BAR_FROBNICATOR (ret);
6690 /* ------------------------------------------------------------------------ */
6693 * FooiGenBarFrobnicatorSkeleton:
6695 * The #FooiGenBarFrobnicatorSkeleton structure contains only private data and should only be accessed using the provided API.
6699 * FooiGenBarFrobnicatorSkeletonClass:
6700 * @parent_class: The parent class.
6702 * Class structure for #FooiGenBarFrobnicatorSkeleton.
6705 struct _FooiGenBarFrobnicatorSkeletonPrivate
6708 GList *changed_properties;
6709 GSource *changed_properties_idle_source;
6710 GMainContext *context;
6715 _foo_igen_bar_frobnicator_skeleton_handle_method_call (
6716 GDBusConnection *connection,
6717 const gchar *sender,
6718 const gchar *object_path,
6719 const gchar *interface_name,
6720 const gchar *method_name,
6721 GVariant *parameters,
6722 GDBusMethodInvocation *invocation,
6725 FooiGenBarFrobnicatorSkeleton *skeleton = FOO_IGEN_BAR_FROBNICATOR_SKELETON (user_data);
6726 _ExtendedGDBusMethodInfo *info;
6734 GValue return_value = G_VALUE_INIT;
6735 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
6736 g_assert (info != NULL);
6737 num_params = g_variant_n_children (parameters);
6738 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
6740 g_value_init (¶mv[n], FOO_IGEN_TYPE_BAR_FROBNICATOR);
6741 g_value_set_object (¶mv[n++], skeleton);
6742 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
6743 g_value_set_object (¶mv[n++], invocation);
6744 if (info->pass_fdlist)
6747 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
6748 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
6750 g_assert_not_reached ();
6753 g_variant_iter_init (&iter, parameters);
6754 while ((child = g_variant_iter_next_value (&iter)) != NULL)
6756 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
6757 if (arg_info->use_gvariant)
6759 g_value_init (¶mv[n], G_TYPE_VARIANT);
6760 g_value_set_variant (¶mv[n], child);
6764 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
6765 g_variant_unref (child);
6767 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAR_FROBNICATOR);
6768 g_value_init (&return_value, G_TYPE_BOOLEAN);
6769 g_signal_emitv (paramv, signal_id, 0, &return_value);
6770 if (!g_value_get_boolean (&return_value))
6771 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
6772 g_value_unset (&return_value);
6773 for (n = 0; n < num_params + num_extra; n++)
6774 g_value_unset (¶mv[n]);
6779 _foo_igen_bar_frobnicator_skeleton_handle_get_property (
6780 GDBusConnection *connection,
6781 const gchar *sender,
6782 const gchar *object_path,
6783 const gchar *interface_name,
6784 const gchar *property_name,
6788 FooiGenBarFrobnicatorSkeleton *skeleton = FOO_IGEN_BAR_FROBNICATOR_SKELETON (user_data);
6789 GValue value = G_VALUE_INIT;
6791 _ExtendedGDBusPropertyInfo *info;
6794 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_frobnicator_interface_info, property_name);
6795 g_assert (info != NULL);
6796 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
6799 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
6803 g_value_init (&value, pspec->value_type);
6804 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
6805 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
6806 g_value_unset (&value);
6812 _foo_igen_bar_frobnicator_skeleton_handle_set_property (
6813 GDBusConnection *connection,
6814 const gchar *sender,
6815 const gchar *object_path,
6816 const gchar *interface_name,
6817 const gchar *property_name,
6822 FooiGenBarFrobnicatorSkeleton *skeleton = FOO_IGEN_BAR_FROBNICATOR_SKELETON (user_data);
6823 GValue value = G_VALUE_INIT;
6825 _ExtendedGDBusPropertyInfo *info;
6828 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bar_frobnicator_interface_info, property_name);
6829 g_assert (info != NULL);
6830 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
6833 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
6837 if (info->use_gvariant)
6838 g_value_set_variant (&value, variant);
6840 g_dbus_gvariant_to_gvalue (variant, &value);
6841 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
6842 g_value_unset (&value);
6848 static const GDBusInterfaceVTable _foo_igen_bar_frobnicator_skeleton_vtable =
6850 _foo_igen_bar_frobnicator_skeleton_handle_method_call,
6851 _foo_igen_bar_frobnicator_skeleton_handle_get_property,
6852 _foo_igen_bar_frobnicator_skeleton_handle_set_property
6855 static GDBusInterfaceInfo *
6856 foo_igen_bar_frobnicator_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
6858 return foo_igen_bar_frobnicator_interface_info ();
6861 static GDBusInterfaceVTable *
6862 foo_igen_bar_frobnicator_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
6864 return (GDBusInterfaceVTable *) &_foo_igen_bar_frobnicator_skeleton_vtable;
6868 foo_igen_bar_frobnicator_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
6870 FooiGenBarFrobnicatorSkeleton *skeleton = FOO_IGEN_BAR_FROBNICATOR_SKELETON (_skeleton);
6872 GVariantBuilder builder;
6874 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
6875 if (_foo_igen_bar_frobnicator_interface_info.parent_struct.properties == NULL)
6877 for (n = 0; _foo_igen_bar_frobnicator_interface_info.parent_struct.properties[n] != NULL; n++)
6879 GDBusPropertyInfo *info = _foo_igen_bar_frobnicator_interface_info.parent_struct.properties[n];
6880 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
6883 value = _foo_igen_bar_frobnicator_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Bar.Frobnicator", info->name, NULL, skeleton);
6886 g_variant_take_ref (value);
6887 g_variant_builder_add (&builder, "{sv}", info->name, value);
6888 g_variant_unref (value);
6893 return g_variant_builder_end (&builder);
6897 foo_igen_bar_frobnicator_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
6901 static void foo_igen_bar_frobnicator_skeleton_iface_init (FooiGenBarFrobnicatorIface *iface);
6902 G_DEFINE_TYPE_WITH_CODE (FooiGenBarFrobnicatorSkeleton, foo_igen_bar_frobnicator_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
6903 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAR_FROBNICATOR, foo_igen_bar_frobnicator_skeleton_iface_init));
6906 foo_igen_bar_frobnicator_skeleton_finalize (GObject *object)
6908 FooiGenBarFrobnicatorSkeleton *skeleton = FOO_IGEN_BAR_FROBNICATOR_SKELETON (object);
6909 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
6910 if (skeleton->priv->changed_properties_idle_source != NULL)
6911 g_source_destroy (skeleton->priv->changed_properties_idle_source);
6912 g_main_context_unref (skeleton->priv->context);
6913 g_mutex_clear (&skeleton->priv->lock);
6914 G_OBJECT_CLASS (foo_igen_bar_frobnicator_skeleton_parent_class)->finalize (object);
6918 foo_igen_bar_frobnicator_skeleton_init (FooiGenBarFrobnicatorSkeleton *skeleton)
6920 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_BAR_FROBNICATOR_SKELETON, FooiGenBarFrobnicatorSkeletonPrivate);
6921 g_mutex_init (&skeleton->priv->lock);
6922 skeleton->priv->context = g_main_context_ref_thread_default ();
6926 foo_igen_bar_frobnicator_skeleton_class_init (FooiGenBarFrobnicatorSkeletonClass *klass)
6928 GObjectClass *gobject_class;
6929 GDBusInterfaceSkeletonClass *skeleton_class;
6931 g_type_class_add_private (klass, sizeof (FooiGenBarFrobnicatorSkeletonPrivate));
6933 gobject_class = G_OBJECT_CLASS (klass);
6934 gobject_class->finalize = foo_igen_bar_frobnicator_skeleton_finalize;
6936 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
6937 skeleton_class->get_info = foo_igen_bar_frobnicator_skeleton_dbus_interface_get_info;
6938 skeleton_class->get_properties = foo_igen_bar_frobnicator_skeleton_dbus_interface_get_properties;
6939 skeleton_class->flush = foo_igen_bar_frobnicator_skeleton_dbus_interface_flush;
6940 skeleton_class->get_vtable = foo_igen_bar_frobnicator_skeleton_dbus_interface_get_vtable;
6944 foo_igen_bar_frobnicator_skeleton_iface_init (FooiGenBarFrobnicatorIface *iface)
6949 * foo_igen_bar_frobnicator_skeleton_new:
6951 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link>.
6953 * Returns: (transfer full) (type FooiGenBarFrobnicatorSkeleton): The skeleton object.
6955 FooiGenBarFrobnicator *
6956 foo_igen_bar_frobnicator_skeleton_new (void)
6958 return FOO_IGEN_BAR_FROBNICATOR (g_object_new (FOO_IGEN_TYPE_BAR_FROBNICATOR_SKELETON, NULL));
6961 /* ------------------------------------------------------------------------
6962 * Code for interface org.project.Baz
6963 * ------------------------------------------------------------------------
6967 * SECTION:FooiGenBaz
6968 * @title: FooiGenBaz
6969 * @short_description: Generated C code for the org.project.Baz D-Bus interface
6971 * This section contains code for working with the <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link> D-Bus interface in C.
6974 /* ---- Introspection data for org.project.Baz ---- */
6976 static const _ExtendedGDBusInterfaceInfo _foo_igen_baz_interface_info =
6991 * foo_igen_baz_interface_info:
6993 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link> D-Bus interface.
6995 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
6997 GDBusInterfaceInfo *
6998 foo_igen_baz_interface_info (void)
7000 return (GDBusInterfaceInfo *) &_foo_igen_baz_interface_info;
7004 * foo_igen_baz_override_properties:
7005 * @klass: The class structure for a #GObject<!-- -->-derived class.
7006 * @property_id_begin: The property id to assign to the first overridden property.
7008 * Overrides all #GObject properties in the #FooiGenBaz interface for a concrete class.
7009 * The properties are overridden in the order they are defined.
7011 * Returns: The last property id.
7014 foo_igen_baz_override_properties (GObjectClass *klass, guint property_id_begin)
7016 return property_id_begin - 1;
7024 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link>.
7029 * @parent_iface: The parent interface.
7031 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link>.
7035 foo_igen_baz_default_init (FooiGenBazIface *iface)
7039 typedef FooiGenBazIface FooiGenBazInterface;
7040 G_DEFINE_INTERFACE (FooiGenBaz, foo_igen_baz, G_TYPE_OBJECT);
7042 /* ------------------------------------------------------------------------ */
7047 * The #FooiGenBazProxy structure contains only private data and should only be accessed using the provided API.
7051 * FooiGenBazProxyClass:
7052 * @parent_class: The parent class.
7054 * Class structure for #FooiGenBazProxy.
7057 struct _FooiGenBazProxyPrivate
7062 static void foo_igen_baz_proxy_iface_init (FooiGenBazIface *iface);
7064 G_DEFINE_TYPE_WITH_CODE (FooiGenBazProxy, foo_igen_baz_proxy, G_TYPE_DBUS_PROXY,
7065 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAZ, foo_igen_baz_proxy_iface_init));
7068 foo_igen_baz_proxy_finalize (GObject *object)
7070 FooiGenBazProxy *proxy = FOO_IGEN_BAZ_PROXY (object);
7071 g_datalist_clear (&proxy->priv->qdata);
7072 G_OBJECT_CLASS (foo_igen_baz_proxy_parent_class)->finalize (object);
7076 foo_igen_baz_proxy_get_property (GObject *object,
7084 foo_igen_baz_proxy_set_property (GObject *object,
7086 const GValue *value,
7092 foo_igen_baz_proxy_g_signal (GDBusProxy *proxy,
7093 const gchar *sender_name,
7094 const gchar *signal_name,
7095 GVariant *parameters)
7097 _ExtendedGDBusSignalInfo *info;
7104 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_baz_interface_info, signal_name);
7107 num_params = g_variant_n_children (parameters);
7108 paramv = g_new0 (GValue, num_params + 1);
7109 g_value_init (¶mv[0], FOO_IGEN_TYPE_BAZ);
7110 g_value_set_object (¶mv[0], proxy);
7111 g_variant_iter_init (&iter, parameters);
7113 while ((child = g_variant_iter_next_value (&iter)) != NULL)
7115 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
7116 if (arg_info->use_gvariant)
7118 g_value_init (¶mv[n], G_TYPE_VARIANT);
7119 g_value_set_variant (¶mv[n], child);
7123 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
7124 g_variant_unref (child);
7126 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAZ);
7127 g_signal_emitv (paramv, signal_id, 0, NULL);
7128 for (n = 0; n < num_params + 1; n++)
7129 g_value_unset (¶mv[n]);
7134 foo_igen_baz_proxy_g_properties_changed (GDBusProxy *_proxy,
7135 GVariant *changed_properties,
7136 const gchar *const *invalidated_properties)
7138 FooiGenBazProxy *proxy = FOO_IGEN_BAZ_PROXY (_proxy);
7142 _ExtendedGDBusPropertyInfo *info;
7143 g_variant_get (changed_properties, "a{sv}", &iter);
7144 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
7146 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_baz_interface_info, key);
7147 g_datalist_remove_data (&proxy->priv->qdata, key);
7149 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
7151 g_variant_iter_free (iter);
7152 for (n = 0; invalidated_properties[n] != NULL; n++)
7154 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_baz_interface_info, invalidated_properties[n]);
7155 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
7157 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
7162 foo_igen_baz_proxy_init (FooiGenBazProxy *proxy)
7164 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_BAZ_PROXY, FooiGenBazProxyPrivate);
7165 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_baz_interface_info ());
7169 foo_igen_baz_proxy_class_init (FooiGenBazProxyClass *klass)
7171 GObjectClass *gobject_class;
7172 GDBusProxyClass *proxy_class;
7174 g_type_class_add_private (klass, sizeof (FooiGenBazProxyPrivate));
7176 gobject_class = G_OBJECT_CLASS (klass);
7177 gobject_class->finalize = foo_igen_baz_proxy_finalize;
7178 gobject_class->get_property = foo_igen_baz_proxy_get_property;
7179 gobject_class->set_property = foo_igen_baz_proxy_set_property;
7181 proxy_class = G_DBUS_PROXY_CLASS (klass);
7182 proxy_class->g_signal = foo_igen_baz_proxy_g_signal;
7183 proxy_class->g_properties_changed = foo_igen_baz_proxy_g_properties_changed;
7188 foo_igen_baz_proxy_iface_init (FooiGenBazIface *iface)
7193 * foo_igen_baz_proxy_new:
7194 * @connection: A #GDBusConnection.
7195 * @flags: Flags from the #GDBusProxyFlags enumeration.
7196 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
7197 * @object_path: An object path.
7198 * @cancellable: (allow-none): A #GCancellable or %NULL.
7199 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
7200 * @user_data: User data to pass to @callback.
7202 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link>. See g_dbus_proxy_new() for more details.
7204 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
7205 * You can then call foo_igen_baz_proxy_new_finish() to get the result of the operation.
7207 * See foo_igen_baz_proxy_new_sync() for the synchronous, blocking version of this constructor.
7210 foo_igen_baz_proxy_new (
7211 GDBusConnection *connection,
7212 GDBusProxyFlags flags,
7214 const gchar *object_path,
7215 GCancellable *cancellable,
7216 GAsyncReadyCallback callback,
7219 g_async_initable_new_async (FOO_IGEN_TYPE_BAZ_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.Baz", NULL);
7223 * foo_igen_baz_proxy_new_finish:
7224 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_baz_proxy_new().
7225 * @error: Return location for error or %NULL
7227 * Finishes an operation started with foo_igen_baz_proxy_new().
7229 * Returns: (transfer full) (type FooiGenBazProxy): The constructed proxy object or %NULL if @error is set.
7232 foo_igen_baz_proxy_new_finish (
7237 GObject *source_object;
7238 source_object = g_async_result_get_source_object (res);
7239 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
7240 g_object_unref (source_object);
7242 return FOO_IGEN_BAZ (ret);
7248 * foo_igen_baz_proxy_new_sync:
7249 * @connection: A #GDBusConnection.
7250 * @flags: Flags from the #GDBusProxyFlags enumeration.
7251 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
7252 * @object_path: An object path.
7253 * @cancellable: (allow-none): A #GCancellable or %NULL.
7254 * @error: Return location for error or %NULL
7256 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link>. See g_dbus_proxy_new_sync() for more details.
7258 * The calling thread is blocked until a reply is received.
7260 * See foo_igen_baz_proxy_new() for the asynchronous version of this constructor.
7262 * Returns: (transfer full) (type FooiGenBazProxy): The constructed proxy object or %NULL if @error is set.
7265 foo_igen_baz_proxy_new_sync (
7266 GDBusConnection *connection,
7267 GDBusProxyFlags flags,
7269 const gchar *object_path,
7270 GCancellable *cancellable,
7274 ret = g_initable_new (FOO_IGEN_TYPE_BAZ_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.project.Baz", NULL);
7276 return FOO_IGEN_BAZ (ret);
7283 * foo_igen_baz_proxy_new_for_bus:
7284 * @bus_type: A #GBusType.
7285 * @flags: Flags from the #GDBusProxyFlags enumeration.
7286 * @name: A bus name (well-known or unique).
7287 * @object_path: An object path.
7288 * @cancellable: (allow-none): A #GCancellable or %NULL.
7289 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
7290 * @user_data: User data to pass to @callback.
7292 * Like foo_igen_baz_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
7294 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
7295 * You can then call foo_igen_baz_proxy_new_for_bus_finish() to get the result of the operation.
7297 * See foo_igen_baz_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
7300 foo_igen_baz_proxy_new_for_bus (
7302 GDBusProxyFlags flags,
7304 const gchar *object_path,
7305 GCancellable *cancellable,
7306 GAsyncReadyCallback callback,
7309 g_async_initable_new_async (FOO_IGEN_TYPE_BAZ_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.Baz", NULL);
7313 * foo_igen_baz_proxy_new_for_bus_finish:
7314 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_baz_proxy_new_for_bus().
7315 * @error: Return location for error or %NULL
7317 * Finishes an operation started with foo_igen_baz_proxy_new_for_bus().
7319 * Returns: (transfer full) (type FooiGenBazProxy): The constructed proxy object or %NULL if @error is set.
7322 foo_igen_baz_proxy_new_for_bus_finish (
7327 GObject *source_object;
7328 source_object = g_async_result_get_source_object (res);
7329 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
7330 g_object_unref (source_object);
7332 return FOO_IGEN_BAZ (ret);
7338 * foo_igen_baz_proxy_new_for_bus_sync:
7339 * @bus_type: A #GBusType.
7340 * @flags: Flags from the #GDBusProxyFlags enumeration.
7341 * @name: A bus name (well-known or unique).
7342 * @object_path: An object path.
7343 * @cancellable: (allow-none): A #GCancellable or %NULL.
7344 * @error: Return location for error or %NULL
7346 * Like foo_igen_baz_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
7348 * The calling thread is blocked until a reply is received.
7350 * See foo_igen_baz_proxy_new_for_bus() for the asynchronous version of this constructor.
7352 * Returns: (transfer full) (type FooiGenBazProxy): The constructed proxy object or %NULL if @error is set.
7355 foo_igen_baz_proxy_new_for_bus_sync (
7357 GDBusProxyFlags flags,
7359 const gchar *object_path,
7360 GCancellable *cancellable,
7364 ret = g_initable_new (FOO_IGEN_TYPE_BAZ_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.project.Baz", NULL);
7366 return FOO_IGEN_BAZ (ret);
7372 /* ------------------------------------------------------------------------ */
7375 * FooiGenBazSkeleton:
7377 * The #FooiGenBazSkeleton structure contains only private data and should only be accessed using the provided API.
7381 * FooiGenBazSkeletonClass:
7382 * @parent_class: The parent class.
7384 * Class structure for #FooiGenBazSkeleton.
7387 struct _FooiGenBazSkeletonPrivate
7390 GList *changed_properties;
7391 GSource *changed_properties_idle_source;
7392 GMainContext *context;
7397 _foo_igen_baz_skeleton_handle_method_call (
7398 GDBusConnection *connection,
7399 const gchar *sender,
7400 const gchar *object_path,
7401 const gchar *interface_name,
7402 const gchar *method_name,
7403 GVariant *parameters,
7404 GDBusMethodInvocation *invocation,
7407 FooiGenBazSkeleton *skeleton = FOO_IGEN_BAZ_SKELETON (user_data);
7408 _ExtendedGDBusMethodInfo *info;
7416 GValue return_value = G_VALUE_INIT;
7417 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
7418 g_assert (info != NULL);
7419 num_params = g_variant_n_children (parameters);
7420 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
7422 g_value_init (¶mv[n], FOO_IGEN_TYPE_BAZ);
7423 g_value_set_object (¶mv[n++], skeleton);
7424 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
7425 g_value_set_object (¶mv[n++], invocation);
7426 if (info->pass_fdlist)
7429 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
7430 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
7432 g_assert_not_reached ();
7435 g_variant_iter_init (&iter, parameters);
7436 while ((child = g_variant_iter_next_value (&iter)) != NULL)
7438 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
7439 if (arg_info->use_gvariant)
7441 g_value_init (¶mv[n], G_TYPE_VARIANT);
7442 g_value_set_variant (¶mv[n], child);
7446 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
7447 g_variant_unref (child);
7449 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAZ);
7450 g_value_init (&return_value, G_TYPE_BOOLEAN);
7451 g_signal_emitv (paramv, signal_id, 0, &return_value);
7452 if (!g_value_get_boolean (&return_value))
7453 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
7454 g_value_unset (&return_value);
7455 for (n = 0; n < num_params + num_extra; n++)
7456 g_value_unset (¶mv[n]);
7461 _foo_igen_baz_skeleton_handle_get_property (
7462 GDBusConnection *connection,
7463 const gchar *sender,
7464 const gchar *object_path,
7465 const gchar *interface_name,
7466 const gchar *property_name,
7470 FooiGenBazSkeleton *skeleton = FOO_IGEN_BAZ_SKELETON (user_data);
7471 GValue value = G_VALUE_INIT;
7473 _ExtendedGDBusPropertyInfo *info;
7476 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_baz_interface_info, property_name);
7477 g_assert (info != NULL);
7478 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
7481 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
7485 g_value_init (&value, pspec->value_type);
7486 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
7487 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
7488 g_value_unset (&value);
7494 _foo_igen_baz_skeleton_handle_set_property (
7495 GDBusConnection *connection,
7496 const gchar *sender,
7497 const gchar *object_path,
7498 const gchar *interface_name,
7499 const gchar *property_name,
7504 FooiGenBazSkeleton *skeleton = FOO_IGEN_BAZ_SKELETON (user_data);
7505 GValue value = G_VALUE_INIT;
7507 _ExtendedGDBusPropertyInfo *info;
7510 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_baz_interface_info, property_name);
7511 g_assert (info != NULL);
7512 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
7515 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
7519 if (info->use_gvariant)
7520 g_value_set_variant (&value, variant);
7522 g_dbus_gvariant_to_gvalue (variant, &value);
7523 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
7524 g_value_unset (&value);
7530 static const GDBusInterfaceVTable _foo_igen_baz_skeleton_vtable =
7532 _foo_igen_baz_skeleton_handle_method_call,
7533 _foo_igen_baz_skeleton_handle_get_property,
7534 _foo_igen_baz_skeleton_handle_set_property
7537 static GDBusInterfaceInfo *
7538 foo_igen_baz_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
7540 return foo_igen_baz_interface_info ();
7543 static GDBusInterfaceVTable *
7544 foo_igen_baz_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
7546 return (GDBusInterfaceVTable *) &_foo_igen_baz_skeleton_vtable;
7550 foo_igen_baz_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
7552 FooiGenBazSkeleton *skeleton = FOO_IGEN_BAZ_SKELETON (_skeleton);
7554 GVariantBuilder builder;
7556 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
7557 if (_foo_igen_baz_interface_info.parent_struct.properties == NULL)
7559 for (n = 0; _foo_igen_baz_interface_info.parent_struct.properties[n] != NULL; n++)
7561 GDBusPropertyInfo *info = _foo_igen_baz_interface_info.parent_struct.properties[n];
7562 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
7565 value = _foo_igen_baz_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Baz", info->name, NULL, skeleton);
7568 g_variant_take_ref (value);
7569 g_variant_builder_add (&builder, "{sv}", info->name, value);
7570 g_variant_unref (value);
7575 return g_variant_builder_end (&builder);
7579 foo_igen_baz_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
7583 static void foo_igen_baz_skeleton_iface_init (FooiGenBazIface *iface);
7584 G_DEFINE_TYPE_WITH_CODE (FooiGenBazSkeleton, foo_igen_baz_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
7585 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAZ, foo_igen_baz_skeleton_iface_init));
7588 foo_igen_baz_skeleton_finalize (GObject *object)
7590 FooiGenBazSkeleton *skeleton = FOO_IGEN_BAZ_SKELETON (object);
7591 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
7592 if (skeleton->priv->changed_properties_idle_source != NULL)
7593 g_source_destroy (skeleton->priv->changed_properties_idle_source);
7594 g_main_context_unref (skeleton->priv->context);
7595 g_mutex_clear (&skeleton->priv->lock);
7596 G_OBJECT_CLASS (foo_igen_baz_skeleton_parent_class)->finalize (object);
7600 foo_igen_baz_skeleton_init (FooiGenBazSkeleton *skeleton)
7602 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_BAZ_SKELETON, FooiGenBazSkeletonPrivate);
7603 g_mutex_init (&skeleton->priv->lock);
7604 skeleton->priv->context = g_main_context_ref_thread_default ();
7608 foo_igen_baz_skeleton_class_init (FooiGenBazSkeletonClass *klass)
7610 GObjectClass *gobject_class;
7611 GDBusInterfaceSkeletonClass *skeleton_class;
7613 g_type_class_add_private (klass, sizeof (FooiGenBazSkeletonPrivate));
7615 gobject_class = G_OBJECT_CLASS (klass);
7616 gobject_class->finalize = foo_igen_baz_skeleton_finalize;
7618 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
7619 skeleton_class->get_info = foo_igen_baz_skeleton_dbus_interface_get_info;
7620 skeleton_class->get_properties = foo_igen_baz_skeleton_dbus_interface_get_properties;
7621 skeleton_class->flush = foo_igen_baz_skeleton_dbus_interface_flush;
7622 skeleton_class->get_vtable = foo_igen_baz_skeleton_dbus_interface_get_vtable;
7626 foo_igen_baz_skeleton_iface_init (FooiGenBazIface *iface)
7631 * foo_igen_baz_skeleton_new:
7633 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link>.
7635 * Returns: (transfer full) (type FooiGenBazSkeleton): The skeleton object.
7638 foo_igen_baz_skeleton_new (void)
7640 return FOO_IGEN_BAZ (g_object_new (FOO_IGEN_TYPE_BAZ_SKELETON, NULL));
7643 /* ------------------------------------------------------------------------
7644 * Code for interface com.acme.Coyote
7645 * ------------------------------------------------------------------------
7649 * SECTION:FooiGenComAcmeCoyote
7650 * @title: FooiGenComAcmeCoyote
7651 * @short_description: Generated C code for the com.acme.Coyote D-Bus interface
7653 * This section contains code for working with the <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link> D-Bus interface in C.
7656 /* ---- Introspection data for com.acme.Coyote ---- */
7658 static const _ExtendedGDBusMethodInfo _foo_igen_com_acme_coyote_method_info_run =
7671 static const _ExtendedGDBusMethodInfo _foo_igen_com_acme_coyote_method_info_sleep =
7684 static const _ExtendedGDBusMethodInfo _foo_igen_com_acme_coyote_method_info_attack =
7697 static const _ExtendedGDBusMethodInfo * const _foo_igen_com_acme_coyote_method_info_pointers[] =
7699 &_foo_igen_com_acme_coyote_method_info_run,
7700 &_foo_igen_com_acme_coyote_method_info_sleep,
7701 &_foo_igen_com_acme_coyote_method_info_attack,
7705 static const _ExtendedGDBusSignalInfo _foo_igen_com_acme_coyote_signal_info_surprised =
7716 static const _ExtendedGDBusSignalInfo * const _foo_igen_com_acme_coyote_signal_info_pointers[] =
7718 &_foo_igen_com_acme_coyote_signal_info_surprised,
7722 static const _ExtendedGDBusPropertyInfo _foo_igen_com_acme_coyote_property_info_mood =
7728 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
7735 static const _ExtendedGDBusPropertyInfo * const _foo_igen_com_acme_coyote_property_info_pointers[] =
7737 &_foo_igen_com_acme_coyote_property_info_mood,
7741 static const _ExtendedGDBusInterfaceInfo _foo_igen_com_acme_coyote_interface_info =
7746 (GDBusMethodInfo **) &_foo_igen_com_acme_coyote_method_info_pointers,
7747 (GDBusSignalInfo **) &_foo_igen_com_acme_coyote_signal_info_pointers,
7748 (GDBusPropertyInfo **) &_foo_igen_com_acme_coyote_property_info_pointers,
7756 * foo_igen_com_acme_coyote_interface_info:
7758 * Gets a machine-readable description of the <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link> D-Bus interface.
7760 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
7762 GDBusInterfaceInfo *
7763 foo_igen_com_acme_coyote_interface_info (void)
7765 return (GDBusInterfaceInfo *) &_foo_igen_com_acme_coyote_interface_info;
7769 * foo_igen_com_acme_coyote_override_properties:
7770 * @klass: The class structure for a #GObject<!-- -->-derived class.
7771 * @property_id_begin: The property id to assign to the first overridden property.
7773 * Overrides all #GObject properties in the #FooiGenComAcmeCoyote interface for a concrete class.
7774 * The properties are overridden in the order they are defined.
7776 * Returns: The last property id.
7779 foo_igen_com_acme_coyote_override_properties (GObjectClass *klass, guint property_id_begin)
7781 g_object_class_override_property (klass, property_id_begin++, "mood");
7782 return property_id_begin - 1;
7788 * FooiGenComAcmeCoyote:
7790 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link>.
7794 * FooiGenComAcmeCoyoteIface:
7795 * @parent_iface: The parent interface.
7796 * @handle_attack: Handler for the #FooiGenComAcmeCoyote::handle-attack signal.
7797 * @handle_run: Handler for the #FooiGenComAcmeCoyote::handle-run signal.
7798 * @handle_sleep: Handler for the #FooiGenComAcmeCoyote::handle-sleep signal.
7799 * @get_mood: Getter for the #FooiGenComAcmeCoyote:mood property.
7800 * @surprised: Handler for the #FooiGenComAcmeCoyote::surprised signal.
7802 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link>.
7806 foo_igen_com_acme_coyote_default_init (FooiGenComAcmeCoyoteIface *iface)
7808 /* GObject signals for incoming D-Bus method calls: */
7810 * FooiGenComAcmeCoyote::handle-run:
7811 * @object: A #FooiGenComAcmeCoyote.
7812 * @invocation: A #GDBusMethodInvocation.
7814 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-acme-Coyote.Run">Run()</link> D-Bus method.
7816 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_com_acme_coyote_complete_run() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
7818 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
7820 g_signal_new ("handle-run",
7821 G_TYPE_FROM_INTERFACE (iface),
7823 G_STRUCT_OFFSET (FooiGenComAcmeCoyoteIface, handle_run),
7824 g_signal_accumulator_true_handled,
7826 g_cclosure_marshal_generic,
7829 G_TYPE_DBUS_METHOD_INVOCATION);
7832 * FooiGenComAcmeCoyote::handle-sleep:
7833 * @object: A #FooiGenComAcmeCoyote.
7834 * @invocation: A #GDBusMethodInvocation.
7836 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-acme-Coyote.Sleep">Sleep()</link> D-Bus method.
7838 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_com_acme_coyote_complete_sleep() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
7840 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
7842 g_signal_new ("handle-sleep",
7843 G_TYPE_FROM_INTERFACE (iface),
7845 G_STRUCT_OFFSET (FooiGenComAcmeCoyoteIface, handle_sleep),
7846 g_signal_accumulator_true_handled,
7848 g_cclosure_marshal_generic,
7851 G_TYPE_DBUS_METHOD_INVOCATION);
7854 * FooiGenComAcmeCoyote::handle-attack:
7855 * @object: A #FooiGenComAcmeCoyote.
7856 * @invocation: A #GDBusMethodInvocation.
7858 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-acme-Coyote.Attack">Attack()</link> D-Bus method.
7860 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_com_acme_coyote_complete_attack() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
7862 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
7864 g_signal_new ("handle-attack",
7865 G_TYPE_FROM_INTERFACE (iface),
7867 G_STRUCT_OFFSET (FooiGenComAcmeCoyoteIface, handle_attack),
7868 g_signal_accumulator_true_handled,
7870 g_cclosure_marshal_generic,
7873 G_TYPE_DBUS_METHOD_INVOCATION);
7875 /* GObject signals for received D-Bus signals: */
7877 * FooiGenComAcmeCoyote::surprised:
7878 * @object: A #FooiGenComAcmeCoyote.
7880 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-acme-Coyote.Surprised">"Surprised"</link> is received.
7882 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
7884 g_signal_new ("surprised",
7885 G_TYPE_FROM_INTERFACE (iface),
7887 G_STRUCT_OFFSET (FooiGenComAcmeCoyoteIface, surprised),
7890 g_cclosure_marshal_generic,
7894 /* GObject properties for D-Bus properties: */
7896 * FooiGenComAcmeCoyote:mood:
7898 * Represents the D-Bus property <link linkend="gdbus-property-com-acme-Coyote.Mood">"Mood"</link>.
7900 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
7902 g_object_interface_install_property (iface,
7903 g_param_spec_string ("mood", "Mood", "Mood", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
7906 typedef FooiGenComAcmeCoyoteIface FooiGenComAcmeCoyoteInterface;
7907 G_DEFINE_INTERFACE (FooiGenComAcmeCoyote, foo_igen_com_acme_coyote, G_TYPE_OBJECT);
7910 * foo_igen_com_acme_coyote_get_mood: (skip)
7911 * @object: A #FooiGenComAcmeCoyote.
7913 * Gets the value of the <link linkend="gdbus-property-com-acme-Coyote.Mood">"Mood"</link> D-Bus property.
7915 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
7917 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_com_acme_coyote_dup_mood() if on another thread.</warning>
7919 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
7922 foo_igen_com_acme_coyote_get_mood (FooiGenComAcmeCoyote *object)
7924 return FOO_IGEN_COM_ACME_COYOTE_GET_IFACE (object)->get_mood (object);
7928 * foo_igen_com_acme_coyote_dup_mood: (skip)
7929 * @object: A #FooiGenComAcmeCoyote.
7931 * Gets a copy of the <link linkend="gdbus-property-com-acme-Coyote.Mood">"Mood"</link> D-Bus property.
7933 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
7935 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
7938 foo_igen_com_acme_coyote_dup_mood (FooiGenComAcmeCoyote *object)
7941 g_object_get (G_OBJECT (object), "mood", &value, NULL);
7946 * foo_igen_com_acme_coyote_set_mood: (skip)
7947 * @object: A #FooiGenComAcmeCoyote.
7948 * @value: The value to set.
7950 * Sets the <link linkend="gdbus-property-com-acme-Coyote.Mood">"Mood"</link> D-Bus property to @value.
7952 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
7955 foo_igen_com_acme_coyote_set_mood (FooiGenComAcmeCoyote *object, const gchar *value)
7957 g_object_set (G_OBJECT (object), "mood", value, NULL);
7961 * foo_igen_com_acme_coyote_emit_surprised:
7962 * @object: A #FooiGenComAcmeCoyote.
7964 * Emits the <link linkend="gdbus-signal-com-acme-Coyote.Surprised">"Surprised"</link> D-Bus signal.
7967 foo_igen_com_acme_coyote_emit_surprised (
7968 FooiGenComAcmeCoyote *object)
7970 g_signal_emit_by_name (object, "surprised");
7974 * foo_igen_com_acme_coyote_call_run:
7975 * @proxy: A #FooiGenComAcmeCoyoteProxy.
7976 * @cancellable: (allow-none): A #GCancellable or %NULL.
7977 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
7978 * @user_data: User data to pass to @callback.
7980 * Asynchronously invokes the <link linkend="gdbus-method-com-acme-Coyote.Run">Run()</link> D-Bus method on @proxy.
7981 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
7982 * You can then call foo_igen_com_acme_coyote_call_run_finish() to get the result of the operation.
7984 * See foo_igen_com_acme_coyote_call_run_sync() for the synchronous, blocking version of this method.
7987 foo_igen_com_acme_coyote_call_run (
7988 FooiGenComAcmeCoyote *proxy,
7989 GCancellable *cancellable,
7990 GAsyncReadyCallback callback,
7993 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
7995 g_variant_new ("()"),
7996 G_DBUS_CALL_FLAGS_NONE,
8004 * foo_igen_com_acme_coyote_call_run_finish:
8005 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8006 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_com_acme_coyote_call_run().
8007 * @error: Return location for error or %NULL.
8009 * Finishes an operation started with foo_igen_com_acme_coyote_call_run().
8011 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
8014 foo_igen_com_acme_coyote_call_run_finish (
8015 FooiGenComAcmeCoyote *proxy,
8020 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
8023 g_variant_get (_ret,
8025 g_variant_unref (_ret);
8027 return _ret != NULL;
8031 * foo_igen_com_acme_coyote_call_run_sync:
8032 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8033 * @cancellable: (allow-none): A #GCancellable or %NULL.
8034 * @error: Return location for error or %NULL.
8036 * Synchronously invokes the <link linkend="gdbus-method-com-acme-Coyote.Run">Run()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
8038 * See foo_igen_com_acme_coyote_call_run() for the asynchronous version of this method.
8040 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
8043 foo_igen_com_acme_coyote_call_run_sync (
8044 FooiGenComAcmeCoyote *proxy,
8045 GCancellable *cancellable,
8049 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
8051 g_variant_new ("()"),
8052 G_DBUS_CALL_FLAGS_NONE,
8058 g_variant_get (_ret,
8060 g_variant_unref (_ret);
8062 return _ret != NULL;
8066 * foo_igen_com_acme_coyote_call_sleep:
8067 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8068 * @cancellable: (allow-none): A #GCancellable or %NULL.
8069 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
8070 * @user_data: User data to pass to @callback.
8072 * Asynchronously invokes the <link linkend="gdbus-method-com-acme-Coyote.Sleep">Sleep()</link> D-Bus method on @proxy.
8073 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
8074 * You can then call foo_igen_com_acme_coyote_call_sleep_finish() to get the result of the operation.
8076 * See foo_igen_com_acme_coyote_call_sleep_sync() for the synchronous, blocking version of this method.
8079 foo_igen_com_acme_coyote_call_sleep (
8080 FooiGenComAcmeCoyote *proxy,
8081 GCancellable *cancellable,
8082 GAsyncReadyCallback callback,
8085 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
8087 g_variant_new ("()"),
8088 G_DBUS_CALL_FLAGS_NONE,
8096 * foo_igen_com_acme_coyote_call_sleep_finish:
8097 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8098 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_com_acme_coyote_call_sleep().
8099 * @error: Return location for error or %NULL.
8101 * Finishes an operation started with foo_igen_com_acme_coyote_call_sleep().
8103 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
8106 foo_igen_com_acme_coyote_call_sleep_finish (
8107 FooiGenComAcmeCoyote *proxy,
8112 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
8115 g_variant_get (_ret,
8117 g_variant_unref (_ret);
8119 return _ret != NULL;
8123 * foo_igen_com_acme_coyote_call_sleep_sync:
8124 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8125 * @cancellable: (allow-none): A #GCancellable or %NULL.
8126 * @error: Return location for error or %NULL.
8128 * Synchronously invokes the <link linkend="gdbus-method-com-acme-Coyote.Sleep">Sleep()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
8130 * See foo_igen_com_acme_coyote_call_sleep() for the asynchronous version of this method.
8132 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
8135 foo_igen_com_acme_coyote_call_sleep_sync (
8136 FooiGenComAcmeCoyote *proxy,
8137 GCancellable *cancellable,
8141 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
8143 g_variant_new ("()"),
8144 G_DBUS_CALL_FLAGS_NONE,
8150 g_variant_get (_ret,
8152 g_variant_unref (_ret);
8154 return _ret != NULL;
8158 * foo_igen_com_acme_coyote_call_attack:
8159 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8160 * @cancellable: (allow-none): A #GCancellable or %NULL.
8161 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
8162 * @user_data: User data to pass to @callback.
8164 * Asynchronously invokes the <link linkend="gdbus-method-com-acme-Coyote.Attack">Attack()</link> D-Bus method on @proxy.
8165 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
8166 * You can then call foo_igen_com_acme_coyote_call_attack_finish() to get the result of the operation.
8168 * See foo_igen_com_acme_coyote_call_attack_sync() for the synchronous, blocking version of this method.
8171 foo_igen_com_acme_coyote_call_attack (
8172 FooiGenComAcmeCoyote *proxy,
8173 GCancellable *cancellable,
8174 GAsyncReadyCallback callback,
8177 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
8179 g_variant_new ("()"),
8180 G_DBUS_CALL_FLAGS_NONE,
8188 * foo_igen_com_acme_coyote_call_attack_finish:
8189 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8190 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_com_acme_coyote_call_attack().
8191 * @error: Return location for error or %NULL.
8193 * Finishes an operation started with foo_igen_com_acme_coyote_call_attack().
8195 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
8198 foo_igen_com_acme_coyote_call_attack_finish (
8199 FooiGenComAcmeCoyote *proxy,
8204 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
8207 g_variant_get (_ret,
8209 g_variant_unref (_ret);
8211 return _ret != NULL;
8215 * foo_igen_com_acme_coyote_call_attack_sync:
8216 * @proxy: A #FooiGenComAcmeCoyoteProxy.
8217 * @cancellable: (allow-none): A #GCancellable or %NULL.
8218 * @error: Return location for error or %NULL.
8220 * Synchronously invokes the <link linkend="gdbus-method-com-acme-Coyote.Attack">Attack()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
8222 * See foo_igen_com_acme_coyote_call_attack() for the asynchronous version of this method.
8224 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
8227 foo_igen_com_acme_coyote_call_attack_sync (
8228 FooiGenComAcmeCoyote *proxy,
8229 GCancellable *cancellable,
8233 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
8235 g_variant_new ("()"),
8236 G_DBUS_CALL_FLAGS_NONE,
8242 g_variant_get (_ret,
8244 g_variant_unref (_ret);
8246 return _ret != NULL;
8250 * foo_igen_com_acme_coyote_complete_run:
8251 * @object: A #FooiGenComAcmeCoyote.
8252 * @invocation: (transfer full): A #GDBusMethodInvocation.
8254 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-acme-Coyote.Run">Run()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
8256 * This method will free @invocation, you cannot use it afterwards.
8259 foo_igen_com_acme_coyote_complete_run (
8260 FooiGenComAcmeCoyote *object,
8261 GDBusMethodInvocation *invocation)
8263 g_dbus_method_invocation_return_value (invocation,
8264 g_variant_new ("()"));
8268 * foo_igen_com_acme_coyote_complete_sleep:
8269 * @object: A #FooiGenComAcmeCoyote.
8270 * @invocation: (transfer full): A #GDBusMethodInvocation.
8272 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-acme-Coyote.Sleep">Sleep()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
8274 * This method will free @invocation, you cannot use it afterwards.
8277 foo_igen_com_acme_coyote_complete_sleep (
8278 FooiGenComAcmeCoyote *object,
8279 GDBusMethodInvocation *invocation)
8281 g_dbus_method_invocation_return_value (invocation,
8282 g_variant_new ("()"));
8286 * foo_igen_com_acme_coyote_complete_attack:
8287 * @object: A #FooiGenComAcmeCoyote.
8288 * @invocation: (transfer full): A #GDBusMethodInvocation.
8290 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-acme-Coyote.Attack">Attack()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
8292 * This method will free @invocation, you cannot use it afterwards.
8295 foo_igen_com_acme_coyote_complete_attack (
8296 FooiGenComAcmeCoyote *object,
8297 GDBusMethodInvocation *invocation)
8299 g_dbus_method_invocation_return_value (invocation,
8300 g_variant_new ("()"));
8303 /* ------------------------------------------------------------------------ */
8306 * FooiGenComAcmeCoyoteProxy:
8308 * The #FooiGenComAcmeCoyoteProxy structure contains only private data and should only be accessed using the provided API.
8312 * FooiGenComAcmeCoyoteProxyClass:
8313 * @parent_class: The parent class.
8315 * Class structure for #FooiGenComAcmeCoyoteProxy.
8318 struct _FooiGenComAcmeCoyoteProxyPrivate
8323 static void foo_igen_com_acme_coyote_proxy_iface_init (FooiGenComAcmeCoyoteIface *iface);
8325 G_DEFINE_TYPE_WITH_CODE (FooiGenComAcmeCoyoteProxy, foo_igen_com_acme_coyote_proxy, G_TYPE_DBUS_PROXY,
8326 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_COM_ACME_COYOTE, foo_igen_com_acme_coyote_proxy_iface_init));
8329 foo_igen_com_acme_coyote_proxy_finalize (GObject *object)
8331 FooiGenComAcmeCoyoteProxy *proxy = FOO_IGEN_COM_ACME_COYOTE_PROXY (object);
8332 g_datalist_clear (&proxy->priv->qdata);
8333 G_OBJECT_CLASS (foo_igen_com_acme_coyote_proxy_parent_class)->finalize (object);
8337 foo_igen_com_acme_coyote_proxy_get_property (GObject *object,
8342 const _ExtendedGDBusPropertyInfo *info;
8344 g_assert (prop_id != 0 && prop_id - 1 < 1);
8345 info = _foo_igen_com_acme_coyote_property_info_pointers[prop_id - 1];
8346 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
8347 if (info->use_gvariant)
8349 g_value_set_variant (value, variant);
8353 if (variant != NULL)
8354 g_dbus_gvariant_to_gvalue (variant, value);
8356 if (variant != NULL)
8357 g_variant_unref (variant);
8361 foo_igen_com_acme_coyote_proxy_set_property_cb (GDBusProxy *proxy,
8365 const _ExtendedGDBusPropertyInfo *info = user_data;
8368 if (!g_dbus_proxy_call_finish (proxy, res, &error))
8370 g_warning ("Error setting property `%s' on interface com.acme.Coyote: %s (%s, %d)",
8371 info->parent_struct.name,
8372 error->message, g_quark_to_string (error->domain), error->code);
8373 g_error_free (error);
8378 foo_igen_com_acme_coyote_proxy_set_property (GObject *object,
8380 const GValue *value,
8383 const _ExtendedGDBusPropertyInfo *info;
8385 g_assert (prop_id != 0 && prop_id - 1 < 1);
8386 info = _foo_igen_com_acme_coyote_property_info_pointers[prop_id - 1];
8387 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
8388 g_dbus_proxy_call (G_DBUS_PROXY (object),
8389 "org.freedesktop.DBus.Properties.Set",
8390 g_variant_new ("(ssv)", "com.acme.Coyote", info->parent_struct.name, variant),
8391 G_DBUS_CALL_FLAGS_NONE,
8393 NULL, (GAsyncReadyCallback) foo_igen_com_acme_coyote_proxy_set_property_cb, (gpointer) info);
8394 g_variant_unref (variant);
8398 foo_igen_com_acme_coyote_proxy_g_signal (GDBusProxy *proxy,
8399 const gchar *sender_name,
8400 const gchar *signal_name,
8401 GVariant *parameters)
8403 _ExtendedGDBusSignalInfo *info;
8410 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_com_acme_coyote_interface_info, signal_name);
8413 num_params = g_variant_n_children (parameters);
8414 paramv = g_new0 (GValue, num_params + 1);
8415 g_value_init (¶mv[0], FOO_IGEN_TYPE_COM_ACME_COYOTE);
8416 g_value_set_object (¶mv[0], proxy);
8417 g_variant_iter_init (&iter, parameters);
8419 while ((child = g_variant_iter_next_value (&iter)) != NULL)
8421 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
8422 if (arg_info->use_gvariant)
8424 g_value_init (¶mv[n], G_TYPE_VARIANT);
8425 g_value_set_variant (¶mv[n], child);
8429 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
8430 g_variant_unref (child);
8432 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_COM_ACME_COYOTE);
8433 g_signal_emitv (paramv, signal_id, 0, NULL);
8434 for (n = 0; n < num_params + 1; n++)
8435 g_value_unset (¶mv[n]);
8440 foo_igen_com_acme_coyote_proxy_g_properties_changed (GDBusProxy *_proxy,
8441 GVariant *changed_properties,
8442 const gchar *const *invalidated_properties)
8444 FooiGenComAcmeCoyoteProxy *proxy = FOO_IGEN_COM_ACME_COYOTE_PROXY (_proxy);
8448 _ExtendedGDBusPropertyInfo *info;
8449 g_variant_get (changed_properties, "a{sv}", &iter);
8450 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
8452 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_com_acme_coyote_interface_info, key);
8453 g_datalist_remove_data (&proxy->priv->qdata, key);
8455 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
8457 g_variant_iter_free (iter);
8458 for (n = 0; invalidated_properties[n] != NULL; n++)
8460 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_com_acme_coyote_interface_info, invalidated_properties[n]);
8461 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
8463 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
8467 static const gchar *
8468 foo_igen_com_acme_coyote_proxy_get_mood (FooiGenComAcmeCoyote *object)
8470 FooiGenComAcmeCoyoteProxy *proxy = FOO_IGEN_COM_ACME_COYOTE_PROXY (object);
8472 const gchar *value = NULL;
8473 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Mood");
8474 if (variant != NULL)
8476 value = g_variant_get_string (variant, NULL);
8477 g_variant_unref (variant);
8483 foo_igen_com_acme_coyote_proxy_init (FooiGenComAcmeCoyoteProxy *proxy)
8485 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_COM_ACME_COYOTE_PROXY, FooiGenComAcmeCoyoteProxyPrivate);
8486 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_com_acme_coyote_interface_info ());
8490 foo_igen_com_acme_coyote_proxy_class_init (FooiGenComAcmeCoyoteProxyClass *klass)
8492 GObjectClass *gobject_class;
8493 GDBusProxyClass *proxy_class;
8495 g_type_class_add_private (klass, sizeof (FooiGenComAcmeCoyoteProxyPrivate));
8497 gobject_class = G_OBJECT_CLASS (klass);
8498 gobject_class->finalize = foo_igen_com_acme_coyote_proxy_finalize;
8499 gobject_class->get_property = foo_igen_com_acme_coyote_proxy_get_property;
8500 gobject_class->set_property = foo_igen_com_acme_coyote_proxy_set_property;
8502 proxy_class = G_DBUS_PROXY_CLASS (klass);
8503 proxy_class->g_signal = foo_igen_com_acme_coyote_proxy_g_signal;
8504 proxy_class->g_properties_changed = foo_igen_com_acme_coyote_proxy_g_properties_changed;
8507 foo_igen_com_acme_coyote_override_properties (gobject_class, 1);
8511 foo_igen_com_acme_coyote_proxy_iface_init (FooiGenComAcmeCoyoteIface *iface)
8513 iface->get_mood = foo_igen_com_acme_coyote_proxy_get_mood;
8517 * foo_igen_com_acme_coyote_proxy_new:
8518 * @connection: A #GDBusConnection.
8519 * @flags: Flags from the #GDBusProxyFlags enumeration.
8520 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
8521 * @object_path: An object path.
8522 * @cancellable: (allow-none): A #GCancellable or %NULL.
8523 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
8524 * @user_data: User data to pass to @callback.
8526 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link>. See g_dbus_proxy_new() for more details.
8528 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
8529 * You can then call foo_igen_com_acme_coyote_proxy_new_finish() to get the result of the operation.
8531 * See foo_igen_com_acme_coyote_proxy_new_sync() for the synchronous, blocking version of this constructor.
8534 foo_igen_com_acme_coyote_proxy_new (
8535 GDBusConnection *connection,
8536 GDBusProxyFlags flags,
8538 const gchar *object_path,
8539 GCancellable *cancellable,
8540 GAsyncReadyCallback callback,
8543 g_async_initable_new_async (FOO_IGEN_TYPE_COM_ACME_COYOTE_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", "com.acme.Coyote", NULL);
8547 * foo_igen_com_acme_coyote_proxy_new_finish:
8548 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_com_acme_coyote_proxy_new().
8549 * @error: Return location for error or %NULL
8551 * Finishes an operation started with foo_igen_com_acme_coyote_proxy_new().
8553 * Returns: (transfer full) (type FooiGenComAcmeCoyoteProxy): The constructed proxy object or %NULL if @error is set.
8555 FooiGenComAcmeCoyote *
8556 foo_igen_com_acme_coyote_proxy_new_finish (
8561 GObject *source_object;
8562 source_object = g_async_result_get_source_object (res);
8563 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
8564 g_object_unref (source_object);
8566 return FOO_IGEN_COM_ACME_COYOTE (ret);
8572 * foo_igen_com_acme_coyote_proxy_new_sync:
8573 * @connection: A #GDBusConnection.
8574 * @flags: Flags from the #GDBusProxyFlags enumeration.
8575 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
8576 * @object_path: An object path.
8577 * @cancellable: (allow-none): A #GCancellable or %NULL.
8578 * @error: Return location for error or %NULL
8580 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link>. See g_dbus_proxy_new_sync() for more details.
8582 * The calling thread is blocked until a reply is received.
8584 * See foo_igen_com_acme_coyote_proxy_new() for the asynchronous version of this constructor.
8586 * Returns: (transfer full) (type FooiGenComAcmeCoyoteProxy): The constructed proxy object or %NULL if @error is set.
8588 FooiGenComAcmeCoyote *
8589 foo_igen_com_acme_coyote_proxy_new_sync (
8590 GDBusConnection *connection,
8591 GDBusProxyFlags flags,
8593 const gchar *object_path,
8594 GCancellable *cancellable,
8598 ret = g_initable_new (FOO_IGEN_TYPE_COM_ACME_COYOTE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.acme.Coyote", NULL);
8600 return FOO_IGEN_COM_ACME_COYOTE (ret);
8607 * foo_igen_com_acme_coyote_proxy_new_for_bus:
8608 * @bus_type: A #GBusType.
8609 * @flags: Flags from the #GDBusProxyFlags enumeration.
8610 * @name: A bus name (well-known or unique).
8611 * @object_path: An object path.
8612 * @cancellable: (allow-none): A #GCancellable or %NULL.
8613 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
8614 * @user_data: User data to pass to @callback.
8616 * Like foo_igen_com_acme_coyote_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
8618 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
8619 * You can then call foo_igen_com_acme_coyote_proxy_new_for_bus_finish() to get the result of the operation.
8621 * See foo_igen_com_acme_coyote_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
8624 foo_igen_com_acme_coyote_proxy_new_for_bus (
8626 GDBusProxyFlags flags,
8628 const gchar *object_path,
8629 GCancellable *cancellable,
8630 GAsyncReadyCallback callback,
8633 g_async_initable_new_async (FOO_IGEN_TYPE_COM_ACME_COYOTE_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", "com.acme.Coyote", NULL);
8637 * foo_igen_com_acme_coyote_proxy_new_for_bus_finish:
8638 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_com_acme_coyote_proxy_new_for_bus().
8639 * @error: Return location for error or %NULL
8641 * Finishes an operation started with foo_igen_com_acme_coyote_proxy_new_for_bus().
8643 * Returns: (transfer full) (type FooiGenComAcmeCoyoteProxy): The constructed proxy object or %NULL if @error is set.
8645 FooiGenComAcmeCoyote *
8646 foo_igen_com_acme_coyote_proxy_new_for_bus_finish (
8651 GObject *source_object;
8652 source_object = g_async_result_get_source_object (res);
8653 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
8654 g_object_unref (source_object);
8656 return FOO_IGEN_COM_ACME_COYOTE (ret);
8662 * foo_igen_com_acme_coyote_proxy_new_for_bus_sync:
8663 * @bus_type: A #GBusType.
8664 * @flags: Flags from the #GDBusProxyFlags enumeration.
8665 * @name: A bus name (well-known or unique).
8666 * @object_path: An object path.
8667 * @cancellable: (allow-none): A #GCancellable or %NULL.
8668 * @error: Return location for error or %NULL
8670 * Like foo_igen_com_acme_coyote_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
8672 * The calling thread is blocked until a reply is received.
8674 * See foo_igen_com_acme_coyote_proxy_new_for_bus() for the asynchronous version of this constructor.
8676 * Returns: (transfer full) (type FooiGenComAcmeCoyoteProxy): The constructed proxy object or %NULL if @error is set.
8678 FooiGenComAcmeCoyote *
8679 foo_igen_com_acme_coyote_proxy_new_for_bus_sync (
8681 GDBusProxyFlags flags,
8683 const gchar *object_path,
8684 GCancellable *cancellable,
8688 ret = g_initable_new (FOO_IGEN_TYPE_COM_ACME_COYOTE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.acme.Coyote", NULL);
8690 return FOO_IGEN_COM_ACME_COYOTE (ret);
8696 /* ------------------------------------------------------------------------ */
8699 * FooiGenComAcmeCoyoteSkeleton:
8701 * The #FooiGenComAcmeCoyoteSkeleton structure contains only private data and should only be accessed using the provided API.
8705 * FooiGenComAcmeCoyoteSkeletonClass:
8706 * @parent_class: The parent class.
8708 * Class structure for #FooiGenComAcmeCoyoteSkeleton.
8711 struct _FooiGenComAcmeCoyoteSkeletonPrivate
8714 GList *changed_properties;
8715 GSource *changed_properties_idle_source;
8716 GMainContext *context;
8721 _foo_igen_com_acme_coyote_skeleton_handle_method_call (
8722 GDBusConnection *connection,
8723 const gchar *sender,
8724 const gchar *object_path,
8725 const gchar *interface_name,
8726 const gchar *method_name,
8727 GVariant *parameters,
8728 GDBusMethodInvocation *invocation,
8731 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (user_data);
8732 _ExtendedGDBusMethodInfo *info;
8740 GValue return_value = G_VALUE_INIT;
8741 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
8742 g_assert (info != NULL);
8743 num_params = g_variant_n_children (parameters);
8744 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
8746 g_value_init (¶mv[n], FOO_IGEN_TYPE_COM_ACME_COYOTE);
8747 g_value_set_object (¶mv[n++], skeleton);
8748 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
8749 g_value_set_object (¶mv[n++], invocation);
8750 if (info->pass_fdlist)
8753 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
8754 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
8756 g_assert_not_reached ();
8759 g_variant_iter_init (&iter, parameters);
8760 while ((child = g_variant_iter_next_value (&iter)) != NULL)
8762 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
8763 if (arg_info->use_gvariant)
8765 g_value_init (¶mv[n], G_TYPE_VARIANT);
8766 g_value_set_variant (¶mv[n], child);
8770 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
8771 g_variant_unref (child);
8773 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_COM_ACME_COYOTE);
8774 g_value_init (&return_value, G_TYPE_BOOLEAN);
8775 g_signal_emitv (paramv, signal_id, 0, &return_value);
8776 if (!g_value_get_boolean (&return_value))
8777 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
8778 g_value_unset (&return_value);
8779 for (n = 0; n < num_params + num_extra; n++)
8780 g_value_unset (¶mv[n]);
8785 _foo_igen_com_acme_coyote_skeleton_handle_get_property (
8786 GDBusConnection *connection,
8787 const gchar *sender,
8788 const gchar *object_path,
8789 const gchar *interface_name,
8790 const gchar *property_name,
8794 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (user_data);
8795 GValue value = G_VALUE_INIT;
8797 _ExtendedGDBusPropertyInfo *info;
8800 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_com_acme_coyote_interface_info, property_name);
8801 g_assert (info != NULL);
8802 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
8805 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
8809 g_value_init (&value, pspec->value_type);
8810 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
8811 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
8812 g_value_unset (&value);
8818 _foo_igen_com_acme_coyote_skeleton_handle_set_property (
8819 GDBusConnection *connection,
8820 const gchar *sender,
8821 const gchar *object_path,
8822 const gchar *interface_name,
8823 const gchar *property_name,
8828 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (user_data);
8829 GValue value = G_VALUE_INIT;
8831 _ExtendedGDBusPropertyInfo *info;
8834 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_com_acme_coyote_interface_info, property_name);
8835 g_assert (info != NULL);
8836 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
8839 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
8843 if (info->use_gvariant)
8844 g_value_set_variant (&value, variant);
8846 g_dbus_gvariant_to_gvalue (variant, &value);
8847 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
8848 g_value_unset (&value);
8854 static const GDBusInterfaceVTable _foo_igen_com_acme_coyote_skeleton_vtable =
8856 _foo_igen_com_acme_coyote_skeleton_handle_method_call,
8857 _foo_igen_com_acme_coyote_skeleton_handle_get_property,
8858 _foo_igen_com_acme_coyote_skeleton_handle_set_property
8861 static GDBusInterfaceInfo *
8862 foo_igen_com_acme_coyote_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
8864 return foo_igen_com_acme_coyote_interface_info ();
8867 static GDBusInterfaceVTable *
8868 foo_igen_com_acme_coyote_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
8870 return (GDBusInterfaceVTable *) &_foo_igen_com_acme_coyote_skeleton_vtable;
8874 foo_igen_com_acme_coyote_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
8876 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (_skeleton);
8878 GVariantBuilder builder;
8880 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
8881 if (_foo_igen_com_acme_coyote_interface_info.parent_struct.properties == NULL)
8883 for (n = 0; _foo_igen_com_acme_coyote_interface_info.parent_struct.properties[n] != NULL; n++)
8885 GDBusPropertyInfo *info = _foo_igen_com_acme_coyote_interface_info.parent_struct.properties[n];
8886 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
8889 value = _foo_igen_com_acme_coyote_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.acme.Coyote", info->name, NULL, skeleton);
8892 g_variant_take_ref (value);
8893 g_variant_builder_add (&builder, "{sv}", info->name, value);
8894 g_variant_unref (value);
8899 return g_variant_builder_end (&builder);
8902 static gboolean _foo_igen_com_acme_coyote_emit_changed (gpointer user_data);
8905 foo_igen_com_acme_coyote_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
8907 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (_skeleton);
8908 gboolean emit_changed = FALSE;
8910 g_mutex_lock (&skeleton->priv->lock);
8911 if (skeleton->priv->changed_properties_idle_source != NULL)
8913 g_source_destroy (skeleton->priv->changed_properties_idle_source);
8914 skeleton->priv->changed_properties_idle_source = NULL;
8915 emit_changed = TRUE;
8917 g_mutex_unlock (&skeleton->priv->lock);
8920 _foo_igen_com_acme_coyote_emit_changed (skeleton);
8924 _foo_igen_com_acme_coyote_on_signal_surprised (
8925 FooiGenComAcmeCoyote *object)
8927 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (object);
8929 GList *connections, *l;
8930 GVariant *signal_variant;
8931 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
8933 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
8934 for (l = connections; l != NULL; l = l->next)
8936 GDBusConnection *connection = l->data;
8937 g_dbus_connection_emit_signal (connection,
8938 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.acme.Coyote", "Surprised",
8939 signal_variant, NULL);
8941 g_variant_unref (signal_variant);
8942 g_list_free_full (connections, g_object_unref);
8945 static void foo_igen_com_acme_coyote_skeleton_iface_init (FooiGenComAcmeCoyoteIface *iface);
8946 G_DEFINE_TYPE_WITH_CODE (FooiGenComAcmeCoyoteSkeleton, foo_igen_com_acme_coyote_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
8947 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_COM_ACME_COYOTE, foo_igen_com_acme_coyote_skeleton_iface_init));
8950 foo_igen_com_acme_coyote_skeleton_finalize (GObject *object)
8952 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (object);
8954 for (n = 0; n < 1; n++)
8955 g_value_unset (&skeleton->priv->properties[n]);
8956 g_free (skeleton->priv->properties);
8957 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
8958 if (skeleton->priv->changed_properties_idle_source != NULL)
8959 g_source_destroy (skeleton->priv->changed_properties_idle_source);
8960 g_main_context_unref (skeleton->priv->context);
8961 g_mutex_clear (&skeleton->priv->lock);
8962 G_OBJECT_CLASS (foo_igen_com_acme_coyote_skeleton_parent_class)->finalize (object);
8966 foo_igen_com_acme_coyote_skeleton_get_property (GObject *object,
8971 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (object);
8972 g_assert (prop_id != 0 && prop_id - 1 < 1);
8973 g_mutex_lock (&skeleton->priv->lock);
8974 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
8975 g_mutex_unlock (&skeleton->priv->lock);
8979 _foo_igen_com_acme_coyote_emit_changed (gpointer user_data)
8981 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (user_data);
8983 GVariantBuilder builder;
8984 GVariantBuilder invalidated_builder;
8987 g_mutex_lock (&skeleton->priv->lock);
8988 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
8989 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
8990 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
8992 ChangedProperty *cp = l->data;
8994 const GValue *cur_value;
8996 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
8997 if (!_g_value_equal (cur_value, &cp->orig_value))
8999 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
9000 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
9001 g_variant_unref (variant);
9005 if (num_changes > 0)
9007 GList *connections, *l;
9008 GVariant *signal_variant;
9009 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "com.acme.Coyote",
9010 &builder, &invalidated_builder));
9011 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
9012 for (l = connections; l != NULL; l = l->next)
9014 GDBusConnection *connection = l->data;
9016 g_dbus_connection_emit_signal (connection,
9017 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
9018 "org.freedesktop.DBus.Properties",
9019 "PropertiesChanged",
9023 g_variant_unref (signal_variant);
9024 g_list_free_full (connections, g_object_unref);
9028 g_variant_builder_clear (&builder);
9029 g_variant_builder_clear (&invalidated_builder);
9031 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
9032 skeleton->priv->changed_properties = NULL;
9033 skeleton->priv->changed_properties_idle_source = NULL;
9034 g_mutex_unlock (&skeleton->priv->lock);
9039 _foo_igen_com_acme_coyote_schedule_emit_changed (FooiGenComAcmeCoyoteSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
9041 ChangedProperty *cp;
9044 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
9046 ChangedProperty *i_cp = l->data;
9047 if (i_cp->info == info)
9055 cp = g_new0 (ChangedProperty, 1);
9056 cp->prop_id = prop_id;
9058 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
9059 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
9060 g_value_copy (orig_value, &cp->orig_value);
9065 foo_igen_com_acme_coyote_skeleton_notify (GObject *object,
9068 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (object);
9069 g_mutex_lock (&skeleton->priv->lock);
9070 if (skeleton->priv->changed_properties != NULL &&
9071 skeleton->priv->changed_properties_idle_source == NULL)
9073 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
9074 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
9075 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_com_acme_coyote_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
9076 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
9077 g_source_unref (skeleton->priv->changed_properties_idle_source);
9079 g_mutex_unlock (&skeleton->priv->lock);
9083 foo_igen_com_acme_coyote_skeleton_set_property (GObject *object,
9085 const GValue *value,
9088 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (object);
9089 g_assert (prop_id != 0 && prop_id - 1 < 1);
9090 g_mutex_lock (&skeleton->priv->lock);
9091 g_object_freeze_notify (object);
9092 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
9094 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
9095 _foo_igen_com_acme_coyote_schedule_emit_changed (skeleton, _foo_igen_com_acme_coyote_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
9096 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
9097 g_object_notify_by_pspec (object, pspec);
9099 g_mutex_unlock (&skeleton->priv->lock);
9100 g_object_thaw_notify (object);
9104 foo_igen_com_acme_coyote_skeleton_init (FooiGenComAcmeCoyoteSkeleton *skeleton)
9106 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_COM_ACME_COYOTE_SKELETON, FooiGenComAcmeCoyoteSkeletonPrivate);
9107 g_mutex_init (&skeleton->priv->lock);
9108 skeleton->priv->context = g_main_context_ref_thread_default ();
9109 skeleton->priv->properties = g_new0 (GValue, 1);
9110 g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
9113 static const gchar *
9114 foo_igen_com_acme_coyote_skeleton_get_mood (FooiGenComAcmeCoyote *object)
9116 FooiGenComAcmeCoyoteSkeleton *skeleton = FOO_IGEN_COM_ACME_COYOTE_SKELETON (object);
9118 g_mutex_lock (&skeleton->priv->lock);
9119 value = g_value_get_string (&(skeleton->priv->properties[0]));
9120 g_mutex_unlock (&skeleton->priv->lock);
9125 foo_igen_com_acme_coyote_skeleton_class_init (FooiGenComAcmeCoyoteSkeletonClass *klass)
9127 GObjectClass *gobject_class;
9128 GDBusInterfaceSkeletonClass *skeleton_class;
9130 g_type_class_add_private (klass, sizeof (FooiGenComAcmeCoyoteSkeletonPrivate));
9132 gobject_class = G_OBJECT_CLASS (klass);
9133 gobject_class->finalize = foo_igen_com_acme_coyote_skeleton_finalize;
9134 gobject_class->get_property = foo_igen_com_acme_coyote_skeleton_get_property;
9135 gobject_class->set_property = foo_igen_com_acme_coyote_skeleton_set_property;
9136 gobject_class->notify = foo_igen_com_acme_coyote_skeleton_notify;
9139 foo_igen_com_acme_coyote_override_properties (gobject_class, 1);
9141 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
9142 skeleton_class->get_info = foo_igen_com_acme_coyote_skeleton_dbus_interface_get_info;
9143 skeleton_class->get_properties = foo_igen_com_acme_coyote_skeleton_dbus_interface_get_properties;
9144 skeleton_class->flush = foo_igen_com_acme_coyote_skeleton_dbus_interface_flush;
9145 skeleton_class->get_vtable = foo_igen_com_acme_coyote_skeleton_dbus_interface_get_vtable;
9149 foo_igen_com_acme_coyote_skeleton_iface_init (FooiGenComAcmeCoyoteIface *iface)
9151 iface->surprised = _foo_igen_com_acme_coyote_on_signal_surprised;
9152 iface->get_mood = foo_igen_com_acme_coyote_skeleton_get_mood;
9156 * foo_igen_com_acme_coyote_skeleton_new:
9158 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link>.
9160 * Returns: (transfer full) (type FooiGenComAcmeCoyoteSkeleton): The skeleton object.
9162 FooiGenComAcmeCoyote *
9163 foo_igen_com_acme_coyote_skeleton_new (void)
9165 return FOO_IGEN_COM_ACME_COYOTE (g_object_new (FOO_IGEN_TYPE_COM_ACME_COYOTE_SKELETON, NULL));
9168 /* ------------------------------------------------------------------------
9169 * Code for interface com.acme.Rocket
9170 * ------------------------------------------------------------------------
9174 * SECTION:FooiGenRocket123
9175 * @title: FooiGenRocket123
9176 * @short_description: Generated C code for the com.acme.Rocket D-Bus interface
9178 * This section contains code for working with the <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link> D-Bus interface in C.
9181 /* ---- Introspection data for com.acme.Rocket ---- */
9183 static const _ExtendedGDBusMethodInfo _foo_igen_rocket123_method_info_ignite_xyz =
9192 "handle-ignite-xyz",
9196 static const _ExtendedGDBusMethodInfo * const _foo_igen_rocket123_method_info_pointers[] =
9198 &_foo_igen_rocket123_method_info_ignite_xyz,
9202 static const _ExtendedGDBusSignalInfo _foo_igen_rocket123_signal_info_exploded_xyz =
9213 static const _ExtendedGDBusSignalInfo * const _foo_igen_rocket123_signal_info_pointers[] =
9215 &_foo_igen_rocket123_signal_info_exploded_xyz,
9219 static const _ExtendedGDBusPropertyInfo _foo_igen_rocket123_property_info_speed_xyz =
9225 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
9232 static const _ExtendedGDBusPropertyInfo _foo_igen_rocket123_property_info_direction =
9238 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
9245 static const _ExtendedGDBusPropertyInfo _foo_igen_rocket123_property_info_type_ =
9251 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
9258 static const _ExtendedGDBusPropertyInfo * const _foo_igen_rocket123_property_info_pointers[] =
9260 &_foo_igen_rocket123_property_info_speed_xyz,
9261 &_foo_igen_rocket123_property_info_direction,
9262 &_foo_igen_rocket123_property_info_type_,
9266 static const _ExtendedGDBusInterfaceInfo _foo_igen_rocket123_interface_info =
9271 (GDBusMethodInfo **) &_foo_igen_rocket123_method_info_pointers,
9272 (GDBusSignalInfo **) &_foo_igen_rocket123_signal_info_pointers,
9273 (GDBusPropertyInfo **) &_foo_igen_rocket123_property_info_pointers,
9281 * foo_igen_rocket123_interface_info:
9283 * Gets a machine-readable description of the <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link> D-Bus interface.
9285 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
9287 GDBusInterfaceInfo *
9288 foo_igen_rocket123_interface_info (void)
9290 return (GDBusInterfaceInfo *) &_foo_igen_rocket123_interface_info;
9294 * foo_igen_rocket123_override_properties:
9295 * @klass: The class structure for a #GObject<!-- -->-derived class.
9296 * @property_id_begin: The property id to assign to the first overridden property.
9298 * Overrides all #GObject properties in the #FooiGenRocket123 interface for a concrete class.
9299 * The properties are overridden in the order they are defined.
9301 * Returns: The last property id.
9304 foo_igen_rocket123_override_properties (GObjectClass *klass, guint property_id_begin)
9306 g_object_class_override_property (klass, property_id_begin++, "speed-xyz");
9307 g_object_class_override_property (klass, property_id_begin++, "direction");
9308 g_object_class_override_property (klass, property_id_begin++, "type-");
9309 return property_id_begin - 1;
9317 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link>.
9321 * FooiGenRocket123Iface:
9322 * @parent_iface: The parent interface.
9323 * @handle_ignite_xyz: Handler for the #FooiGenRocket123::handle-ignite-xyz signal.
9324 * @get_direction: Getter for the #FooiGenRocket123:direction property.
9325 * @get_speed_xyz: Getter for the #FooiGenRocket123:speed-xyz property.
9326 * @get_type_: Getter for the #FooiGenRocket123:type- property.
9327 * @exploded_xyz: Handler for the #FooiGenRocket123::exploded-xyz signal.
9329 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link>.
9333 foo_igen_rocket123_default_init (FooiGenRocket123Iface *iface)
9335 /* GObject signals for incoming D-Bus method calls: */
9337 * FooiGenRocket123::handle-ignite-xyz:
9338 * @object: A #FooiGenRocket123.
9339 * @invocation: A #GDBusMethodInvocation.
9341 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-acme-Rocket.Ignite">Ignite()</link> D-Bus method.
9343 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_rocket123_complete_ignite_xyz() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
9345 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
9347 g_signal_new ("handle-ignite-xyz",
9348 G_TYPE_FROM_INTERFACE (iface),
9350 G_STRUCT_OFFSET (FooiGenRocket123Iface, handle_ignite_xyz),
9351 g_signal_accumulator_true_handled,
9353 g_cclosure_marshal_generic,
9356 G_TYPE_DBUS_METHOD_INVOCATION);
9358 /* GObject signals for received D-Bus signals: */
9360 * FooiGenRocket123::exploded-xyz:
9361 * @object: A #FooiGenRocket123.
9363 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-acme-Rocket.Exploded">"Exploded"</link> is received.
9365 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
9367 g_signal_new ("exploded-xyz",
9368 G_TYPE_FROM_INTERFACE (iface),
9370 G_STRUCT_OFFSET (FooiGenRocket123Iface, exploded_xyz),
9373 g_cclosure_marshal_generic,
9377 /* GObject properties for D-Bus properties: */
9379 * FooiGenRocket123:speed-xyz:
9381 * Represents the D-Bus property <link linkend="gdbus-property-com-acme-Rocket.Speed">"Speed"</link>.
9383 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
9385 g_object_interface_install_property (iface,
9386 g_param_spec_double ("speed-xyz", "Speed", "Speed", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
9388 * FooiGenRocket123:direction:
9390 * Represents the D-Bus property <link linkend="gdbus-property-com-acme-Rocket.Direction">"Direction"</link>.
9392 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
9394 g_object_interface_install_property (iface,
9395 g_param_spec_variant ("direction", "Direction", "Direction", G_VARIANT_TYPE ("(ddd)"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
9397 * FooiGenRocket123:type-:
9399 * Represents the D-Bus property <link linkend="gdbus-property-com-acme-Rocket.Type">"Type"</link>.
9401 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
9403 g_object_interface_install_property (iface,
9404 g_param_spec_string ("type-", "Type", "Type", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
9407 typedef FooiGenRocket123Iface FooiGenRocket123Interface;
9408 G_DEFINE_INTERFACE (FooiGenRocket123, foo_igen_rocket123, G_TYPE_OBJECT);
9411 * foo_igen_rocket123_get_speed_xyz: (skip)
9412 * @object: A #FooiGenRocket123.
9414 * Gets the value of the <link linkend="gdbus-property-com-acme-Rocket.Speed">"Speed"</link> D-Bus property.
9416 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
9418 * Returns: The property value.
9421 foo_igen_rocket123_get_speed_xyz (FooiGenRocket123 *object)
9423 return FOO_IGEN_ROCKET123_GET_IFACE (object)->get_speed_xyz (object);
9427 * foo_igen_rocket123_set_speed_xyz: (skip)
9428 * @object: A #FooiGenRocket123.
9429 * @value: The value to set.
9431 * Sets the <link linkend="gdbus-property-com-acme-Rocket.Speed">"Speed"</link> D-Bus property to @value.
9433 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
9436 foo_igen_rocket123_set_speed_xyz (FooiGenRocket123 *object, gdouble value)
9438 g_object_set (G_OBJECT (object), "speed-xyz", value, NULL);
9442 * foo_igen_rocket123_get_direction: (skip)
9443 * @object: A #FooiGenRocket123.
9445 * Gets the value of the <link linkend="gdbus-property-com-acme-Rocket.Direction">"Direction"</link> D-Bus property.
9447 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
9449 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_rocket123_dup_direction() if on another thread.</warning>
9451 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
9454 foo_igen_rocket123_get_direction (FooiGenRocket123 *object)
9456 return FOO_IGEN_ROCKET123_GET_IFACE (object)->get_direction (object);
9460 * foo_igen_rocket123_dup_direction: (skip)
9461 * @object: A #FooiGenRocket123.
9463 * Gets a copy of the <link linkend="gdbus-property-com-acme-Rocket.Direction">"Direction"</link> D-Bus property.
9465 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
9467 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
9470 foo_igen_rocket123_dup_direction (FooiGenRocket123 *object)
9473 g_object_get (G_OBJECT (object), "direction", &value, NULL);
9478 * foo_igen_rocket123_set_direction: (skip)
9479 * @object: A #FooiGenRocket123.
9480 * @value: The value to set.
9482 * Sets the <link linkend="gdbus-property-com-acme-Rocket.Direction">"Direction"</link> D-Bus property to @value.
9484 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
9487 foo_igen_rocket123_set_direction (FooiGenRocket123 *object, GVariant *value)
9489 g_object_set (G_OBJECT (object), "direction", value, NULL);
9493 * foo_igen_rocket123_get_type_: (skip)
9494 * @object: A #FooiGenRocket123.
9496 * Gets the value of the <link linkend="gdbus-property-com-acme-Rocket.Type">"Type"</link> D-Bus property.
9498 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
9500 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_rocket123_dup_type_() if on another thread.</warning>
9502 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
9505 foo_igen_rocket123_get_type_ (FooiGenRocket123 *object)
9507 return FOO_IGEN_ROCKET123_GET_IFACE (object)->get_type_ (object);
9511 * foo_igen_rocket123_dup_type_: (skip)
9512 * @object: A #FooiGenRocket123.
9514 * Gets a copy of the <link linkend="gdbus-property-com-acme-Rocket.Type">"Type"</link> D-Bus property.
9516 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
9518 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
9521 foo_igen_rocket123_dup_type_ (FooiGenRocket123 *object)
9524 g_object_get (G_OBJECT (object), "type-", &value, NULL);
9529 * foo_igen_rocket123_set_type_: (skip)
9530 * @object: A #FooiGenRocket123.
9531 * @value: The value to set.
9533 * Sets the <link linkend="gdbus-property-com-acme-Rocket.Type">"Type"</link> D-Bus property to @value.
9535 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
9538 foo_igen_rocket123_set_type_ (FooiGenRocket123 *object, const gchar *value)
9540 g_object_set (G_OBJECT (object), "type-", value, NULL);
9544 * foo_igen_rocket123_emit_exploded_xyz:
9545 * @object: A #FooiGenRocket123.
9547 * Emits the <link linkend="gdbus-signal-com-acme-Rocket.Exploded">"Exploded"</link> D-Bus signal.
9550 foo_igen_rocket123_emit_exploded_xyz (
9551 FooiGenRocket123 *object)
9553 g_signal_emit_by_name (object, "exploded-xyz");
9557 * foo_igen_rocket123_call_ignite_xyz:
9558 * @proxy: A #FooiGenRocket123Proxy.
9559 * @cancellable: (allow-none): A #GCancellable or %NULL.
9560 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
9561 * @user_data: User data to pass to @callback.
9563 * Asynchronously invokes the <link linkend="gdbus-method-com-acme-Rocket.Ignite">Ignite()</link> D-Bus method on @proxy.
9564 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
9565 * You can then call foo_igen_rocket123_call_ignite_xyz_finish() to get the result of the operation.
9567 * See foo_igen_rocket123_call_ignite_xyz_sync() for the synchronous, blocking version of this method.
9570 foo_igen_rocket123_call_ignite_xyz (
9571 FooiGenRocket123 *proxy,
9572 GCancellable *cancellable,
9573 GAsyncReadyCallback callback,
9576 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
9578 g_variant_new ("()"),
9579 G_DBUS_CALL_FLAGS_NONE,
9587 * foo_igen_rocket123_call_ignite_xyz_finish:
9588 * @proxy: A #FooiGenRocket123Proxy.
9589 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_rocket123_call_ignite_xyz().
9590 * @error: Return location for error or %NULL.
9592 * Finishes an operation started with foo_igen_rocket123_call_ignite_xyz().
9594 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
9597 foo_igen_rocket123_call_ignite_xyz_finish (
9598 FooiGenRocket123 *proxy,
9603 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
9606 g_variant_get (_ret,
9608 g_variant_unref (_ret);
9610 return _ret != NULL;
9614 * foo_igen_rocket123_call_ignite_xyz_sync:
9615 * @proxy: A #FooiGenRocket123Proxy.
9616 * @cancellable: (allow-none): A #GCancellable or %NULL.
9617 * @error: Return location for error or %NULL.
9619 * Synchronously invokes the <link linkend="gdbus-method-com-acme-Rocket.Ignite">Ignite()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
9621 * See foo_igen_rocket123_call_ignite_xyz() for the asynchronous version of this method.
9623 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
9626 foo_igen_rocket123_call_ignite_xyz_sync (
9627 FooiGenRocket123 *proxy,
9628 GCancellable *cancellable,
9632 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
9634 g_variant_new ("()"),
9635 G_DBUS_CALL_FLAGS_NONE,
9641 g_variant_get (_ret,
9643 g_variant_unref (_ret);
9645 return _ret != NULL;
9649 * foo_igen_rocket123_complete_ignite_xyz:
9650 * @object: A #FooiGenRocket123.
9651 * @invocation: (transfer full): A #GDBusMethodInvocation.
9653 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-acme-Rocket.Ignite">Ignite()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
9655 * This method will free @invocation, you cannot use it afterwards.
9658 foo_igen_rocket123_complete_ignite_xyz (
9659 FooiGenRocket123 *object,
9660 GDBusMethodInvocation *invocation)
9662 g_dbus_method_invocation_return_value (invocation,
9663 g_variant_new ("()"));
9666 /* ------------------------------------------------------------------------ */
9669 * FooiGenRocket123Proxy:
9671 * The #FooiGenRocket123Proxy structure contains only private data and should only be accessed using the provided API.
9675 * FooiGenRocket123ProxyClass:
9676 * @parent_class: The parent class.
9678 * Class structure for #FooiGenRocket123Proxy.
9681 struct _FooiGenRocket123ProxyPrivate
9686 static void foo_igen_rocket123_proxy_iface_init (FooiGenRocket123Iface *iface);
9688 G_DEFINE_TYPE_WITH_CODE (FooiGenRocket123Proxy, foo_igen_rocket123_proxy, G_TYPE_DBUS_PROXY,
9689 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_ROCKET123, foo_igen_rocket123_proxy_iface_init));
9692 foo_igen_rocket123_proxy_finalize (GObject *object)
9694 FooiGenRocket123Proxy *proxy = FOO_IGEN_ROCKET123_PROXY (object);
9695 g_datalist_clear (&proxy->priv->qdata);
9696 G_OBJECT_CLASS (foo_igen_rocket123_proxy_parent_class)->finalize (object);
9700 foo_igen_rocket123_proxy_get_property (GObject *object,
9705 const _ExtendedGDBusPropertyInfo *info;
9707 g_assert (prop_id != 0 && prop_id - 1 < 3);
9708 info = _foo_igen_rocket123_property_info_pointers[prop_id - 1];
9709 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
9710 if (info->use_gvariant)
9712 g_value_set_variant (value, variant);
9716 if (variant != NULL)
9717 g_dbus_gvariant_to_gvalue (variant, value);
9719 if (variant != NULL)
9720 g_variant_unref (variant);
9724 foo_igen_rocket123_proxy_set_property_cb (GDBusProxy *proxy,
9728 const _ExtendedGDBusPropertyInfo *info = user_data;
9731 if (!g_dbus_proxy_call_finish (proxy, res, &error))
9733 g_warning ("Error setting property `%s' on interface com.acme.Rocket: %s (%s, %d)",
9734 info->parent_struct.name,
9735 error->message, g_quark_to_string (error->domain), error->code);
9736 g_error_free (error);
9741 foo_igen_rocket123_proxy_set_property (GObject *object,
9743 const GValue *value,
9746 const _ExtendedGDBusPropertyInfo *info;
9748 g_assert (prop_id != 0 && prop_id - 1 < 3);
9749 info = _foo_igen_rocket123_property_info_pointers[prop_id - 1];
9750 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
9751 g_dbus_proxy_call (G_DBUS_PROXY (object),
9752 "org.freedesktop.DBus.Properties.Set",
9753 g_variant_new ("(ssv)", "com.acme.Rocket", info->parent_struct.name, variant),
9754 G_DBUS_CALL_FLAGS_NONE,
9756 NULL, (GAsyncReadyCallback) foo_igen_rocket123_proxy_set_property_cb, (gpointer) info);
9757 g_variant_unref (variant);
9761 foo_igen_rocket123_proxy_g_signal (GDBusProxy *proxy,
9762 const gchar *sender_name,
9763 const gchar *signal_name,
9764 GVariant *parameters)
9766 _ExtendedGDBusSignalInfo *info;
9773 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_rocket123_interface_info, signal_name);
9776 num_params = g_variant_n_children (parameters);
9777 paramv = g_new0 (GValue, num_params + 1);
9778 g_value_init (¶mv[0], FOO_IGEN_TYPE_ROCKET123);
9779 g_value_set_object (¶mv[0], proxy);
9780 g_variant_iter_init (&iter, parameters);
9782 while ((child = g_variant_iter_next_value (&iter)) != NULL)
9784 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
9785 if (arg_info->use_gvariant)
9787 g_value_init (¶mv[n], G_TYPE_VARIANT);
9788 g_value_set_variant (¶mv[n], child);
9792 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
9793 g_variant_unref (child);
9795 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_ROCKET123);
9796 g_signal_emitv (paramv, signal_id, 0, NULL);
9797 for (n = 0; n < num_params + 1; n++)
9798 g_value_unset (¶mv[n]);
9803 foo_igen_rocket123_proxy_g_properties_changed (GDBusProxy *_proxy,
9804 GVariant *changed_properties,
9805 const gchar *const *invalidated_properties)
9807 FooiGenRocket123Proxy *proxy = FOO_IGEN_ROCKET123_PROXY (_proxy);
9811 _ExtendedGDBusPropertyInfo *info;
9812 g_variant_get (changed_properties, "a{sv}", &iter);
9813 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
9815 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_rocket123_interface_info, key);
9816 g_datalist_remove_data (&proxy->priv->qdata, key);
9818 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
9820 g_variant_iter_free (iter);
9821 for (n = 0; invalidated_properties[n] != NULL; n++)
9823 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_rocket123_interface_info, invalidated_properties[n]);
9824 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
9826 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
9831 foo_igen_rocket123_proxy_get_speed_xyz (FooiGenRocket123 *object)
9833 FooiGenRocket123Proxy *proxy = FOO_IGEN_ROCKET123_PROXY (object);
9836 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Speed");
9837 if (variant != NULL)
9839 value = g_variant_get_double (variant);
9840 g_variant_unref (variant);
9846 foo_igen_rocket123_proxy_get_direction (FooiGenRocket123 *object)
9848 FooiGenRocket123Proxy *proxy = FOO_IGEN_ROCKET123_PROXY (object);
9850 GVariant *value = NULL;
9851 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Direction");
9853 if (variant != NULL)
9854 g_variant_unref (variant);
9858 static const gchar *
9859 foo_igen_rocket123_proxy_get_type_ (FooiGenRocket123 *object)
9861 FooiGenRocket123Proxy *proxy = FOO_IGEN_ROCKET123_PROXY (object);
9863 const gchar *value = NULL;
9864 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Type");
9865 if (variant != NULL)
9867 value = g_variant_get_string (variant, NULL);
9868 g_variant_unref (variant);
9874 foo_igen_rocket123_proxy_init (FooiGenRocket123Proxy *proxy)
9876 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_ROCKET123_PROXY, FooiGenRocket123ProxyPrivate);
9877 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_rocket123_interface_info ());
9881 foo_igen_rocket123_proxy_class_init (FooiGenRocket123ProxyClass *klass)
9883 GObjectClass *gobject_class;
9884 GDBusProxyClass *proxy_class;
9886 g_type_class_add_private (klass, sizeof (FooiGenRocket123ProxyPrivate));
9888 gobject_class = G_OBJECT_CLASS (klass);
9889 gobject_class->finalize = foo_igen_rocket123_proxy_finalize;
9890 gobject_class->get_property = foo_igen_rocket123_proxy_get_property;
9891 gobject_class->set_property = foo_igen_rocket123_proxy_set_property;
9893 proxy_class = G_DBUS_PROXY_CLASS (klass);
9894 proxy_class->g_signal = foo_igen_rocket123_proxy_g_signal;
9895 proxy_class->g_properties_changed = foo_igen_rocket123_proxy_g_properties_changed;
9898 foo_igen_rocket123_override_properties (gobject_class, 1);
9902 foo_igen_rocket123_proxy_iface_init (FooiGenRocket123Iface *iface)
9904 iface->get_speed_xyz = foo_igen_rocket123_proxy_get_speed_xyz;
9905 iface->get_direction = foo_igen_rocket123_proxy_get_direction;
9906 iface->get_type_ = foo_igen_rocket123_proxy_get_type_;
9910 * foo_igen_rocket123_proxy_new:
9911 * @connection: A #GDBusConnection.
9912 * @flags: Flags from the #GDBusProxyFlags enumeration.
9913 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
9914 * @object_path: An object path.
9915 * @cancellable: (allow-none): A #GCancellable or %NULL.
9916 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
9917 * @user_data: User data to pass to @callback.
9919 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link>. See g_dbus_proxy_new() for more details.
9921 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
9922 * You can then call foo_igen_rocket123_proxy_new_finish() to get the result of the operation.
9924 * See foo_igen_rocket123_proxy_new_sync() for the synchronous, blocking version of this constructor.
9927 foo_igen_rocket123_proxy_new (
9928 GDBusConnection *connection,
9929 GDBusProxyFlags flags,
9931 const gchar *object_path,
9932 GCancellable *cancellable,
9933 GAsyncReadyCallback callback,
9936 g_async_initable_new_async (FOO_IGEN_TYPE_ROCKET123_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", "com.acme.Rocket", NULL);
9940 * foo_igen_rocket123_proxy_new_finish:
9941 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_rocket123_proxy_new().
9942 * @error: Return location for error or %NULL
9944 * Finishes an operation started with foo_igen_rocket123_proxy_new().
9946 * Returns: (transfer full) (type FooiGenRocket123Proxy): The constructed proxy object or %NULL if @error is set.
9949 foo_igen_rocket123_proxy_new_finish (
9954 GObject *source_object;
9955 source_object = g_async_result_get_source_object (res);
9956 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
9957 g_object_unref (source_object);
9959 return FOO_IGEN_ROCKET123 (ret);
9965 * foo_igen_rocket123_proxy_new_sync:
9966 * @connection: A #GDBusConnection.
9967 * @flags: Flags from the #GDBusProxyFlags enumeration.
9968 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
9969 * @object_path: An object path.
9970 * @cancellable: (allow-none): A #GCancellable or %NULL.
9971 * @error: Return location for error or %NULL
9973 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link>. See g_dbus_proxy_new_sync() for more details.
9975 * The calling thread is blocked until a reply is received.
9977 * See foo_igen_rocket123_proxy_new() for the asynchronous version of this constructor.
9979 * Returns: (transfer full) (type FooiGenRocket123Proxy): The constructed proxy object or %NULL if @error is set.
9982 foo_igen_rocket123_proxy_new_sync (
9983 GDBusConnection *connection,
9984 GDBusProxyFlags flags,
9986 const gchar *object_path,
9987 GCancellable *cancellable,
9991 ret = g_initable_new (FOO_IGEN_TYPE_ROCKET123_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.acme.Rocket", NULL);
9993 return FOO_IGEN_ROCKET123 (ret);
10000 * foo_igen_rocket123_proxy_new_for_bus:
10001 * @bus_type: A #GBusType.
10002 * @flags: Flags from the #GDBusProxyFlags enumeration.
10003 * @name: A bus name (well-known or unique).
10004 * @object_path: An object path.
10005 * @cancellable: (allow-none): A #GCancellable or %NULL.
10006 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
10007 * @user_data: User data to pass to @callback.
10009 * Like foo_igen_rocket123_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
10011 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
10012 * You can then call foo_igen_rocket123_proxy_new_for_bus_finish() to get the result of the operation.
10014 * See foo_igen_rocket123_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
10017 foo_igen_rocket123_proxy_new_for_bus (
10019 GDBusProxyFlags flags,
10021 const gchar *object_path,
10022 GCancellable *cancellable,
10023 GAsyncReadyCallback callback,
10024 gpointer user_data)
10026 g_async_initable_new_async (FOO_IGEN_TYPE_ROCKET123_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", "com.acme.Rocket", NULL);
10030 * foo_igen_rocket123_proxy_new_for_bus_finish:
10031 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_rocket123_proxy_new_for_bus().
10032 * @error: Return location for error or %NULL
10034 * Finishes an operation started with foo_igen_rocket123_proxy_new_for_bus().
10036 * Returns: (transfer full) (type FooiGenRocket123Proxy): The constructed proxy object or %NULL if @error is set.
10039 foo_igen_rocket123_proxy_new_for_bus_finish (
10044 GObject *source_object;
10045 source_object = g_async_result_get_source_object (res);
10046 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
10047 g_object_unref (source_object);
10049 return FOO_IGEN_ROCKET123 (ret);
10055 * foo_igen_rocket123_proxy_new_for_bus_sync:
10056 * @bus_type: A #GBusType.
10057 * @flags: Flags from the #GDBusProxyFlags enumeration.
10058 * @name: A bus name (well-known or unique).
10059 * @object_path: An object path.
10060 * @cancellable: (allow-none): A #GCancellable or %NULL.
10061 * @error: Return location for error or %NULL
10063 * Like foo_igen_rocket123_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
10065 * The calling thread is blocked until a reply is received.
10067 * See foo_igen_rocket123_proxy_new_for_bus() for the asynchronous version of this constructor.
10069 * Returns: (transfer full) (type FooiGenRocket123Proxy): The constructed proxy object or %NULL if @error is set.
10072 foo_igen_rocket123_proxy_new_for_bus_sync (
10074 GDBusProxyFlags flags,
10076 const gchar *object_path,
10077 GCancellable *cancellable,
10081 ret = g_initable_new (FOO_IGEN_TYPE_ROCKET123_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.acme.Rocket", NULL);
10083 return FOO_IGEN_ROCKET123 (ret);
10089 /* ------------------------------------------------------------------------ */
10092 * FooiGenRocket123Skeleton:
10094 * The #FooiGenRocket123Skeleton structure contains only private data and should only be accessed using the provided API.
10098 * FooiGenRocket123SkeletonClass:
10099 * @parent_class: The parent class.
10101 * Class structure for #FooiGenRocket123Skeleton.
10104 struct _FooiGenRocket123SkeletonPrivate
10106 GValue *properties;
10107 GList *changed_properties;
10108 GSource *changed_properties_idle_source;
10109 GMainContext *context;
10114 _foo_igen_rocket123_skeleton_handle_method_call (
10115 GDBusConnection *connection,
10116 const gchar *sender,
10117 const gchar *object_path,
10118 const gchar *interface_name,
10119 const gchar *method_name,
10120 GVariant *parameters,
10121 GDBusMethodInvocation *invocation,
10122 gpointer user_data)
10124 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (user_data);
10125 _ExtendedGDBusMethodInfo *info;
10133 GValue return_value = G_VALUE_INIT;
10134 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
10135 g_assert (info != NULL);
10136 num_params = g_variant_n_children (parameters);
10137 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
10139 g_value_init (¶mv[n], FOO_IGEN_TYPE_ROCKET123);
10140 g_value_set_object (¶mv[n++], skeleton);
10141 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
10142 g_value_set_object (¶mv[n++], invocation);
10143 if (info->pass_fdlist)
10146 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
10147 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
10149 g_assert_not_reached ();
10152 g_variant_iter_init (&iter, parameters);
10153 while ((child = g_variant_iter_next_value (&iter)) != NULL)
10155 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
10156 if (arg_info->use_gvariant)
10158 g_value_init (¶mv[n], G_TYPE_VARIANT);
10159 g_value_set_variant (¶mv[n], child);
10163 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
10164 g_variant_unref (child);
10166 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_ROCKET123);
10167 g_value_init (&return_value, G_TYPE_BOOLEAN);
10168 g_signal_emitv (paramv, signal_id, 0, &return_value);
10169 if (!g_value_get_boolean (&return_value))
10170 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
10171 g_value_unset (&return_value);
10172 for (n = 0; n < num_params + num_extra; n++)
10173 g_value_unset (¶mv[n]);
10178 _foo_igen_rocket123_skeleton_handle_get_property (
10179 GDBusConnection *connection,
10180 const gchar *sender,
10181 const gchar *object_path,
10182 const gchar *interface_name,
10183 const gchar *property_name,
10185 gpointer user_data)
10187 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (user_data);
10188 GValue value = G_VALUE_INIT;
10190 _ExtendedGDBusPropertyInfo *info;
10193 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_rocket123_interface_info, property_name);
10194 g_assert (info != NULL);
10195 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
10198 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
10202 g_value_init (&value, pspec->value_type);
10203 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
10204 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
10205 g_value_unset (&value);
10211 _foo_igen_rocket123_skeleton_handle_set_property (
10212 GDBusConnection *connection,
10213 const gchar *sender,
10214 const gchar *object_path,
10215 const gchar *interface_name,
10216 const gchar *property_name,
10219 gpointer user_data)
10221 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (user_data);
10222 GValue value = G_VALUE_INIT;
10224 _ExtendedGDBusPropertyInfo *info;
10227 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_rocket123_interface_info, property_name);
10228 g_assert (info != NULL);
10229 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
10232 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
10236 if (info->use_gvariant)
10237 g_value_set_variant (&value, variant);
10239 g_dbus_gvariant_to_gvalue (variant, &value);
10240 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
10241 g_value_unset (&value);
10247 static const GDBusInterfaceVTable _foo_igen_rocket123_skeleton_vtable =
10249 _foo_igen_rocket123_skeleton_handle_method_call,
10250 _foo_igen_rocket123_skeleton_handle_get_property,
10251 _foo_igen_rocket123_skeleton_handle_set_property
10254 static GDBusInterfaceInfo *
10255 foo_igen_rocket123_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
10257 return foo_igen_rocket123_interface_info ();
10260 static GDBusInterfaceVTable *
10261 foo_igen_rocket123_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
10263 return (GDBusInterfaceVTable *) &_foo_igen_rocket123_skeleton_vtable;
10267 foo_igen_rocket123_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
10269 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (_skeleton);
10271 GVariantBuilder builder;
10273 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
10274 if (_foo_igen_rocket123_interface_info.parent_struct.properties == NULL)
10276 for (n = 0; _foo_igen_rocket123_interface_info.parent_struct.properties[n] != NULL; n++)
10278 GDBusPropertyInfo *info = _foo_igen_rocket123_interface_info.parent_struct.properties[n];
10279 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
10282 value = _foo_igen_rocket123_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.acme.Rocket", info->name, NULL, skeleton);
10285 g_variant_take_ref (value);
10286 g_variant_builder_add (&builder, "{sv}", info->name, value);
10287 g_variant_unref (value);
10292 return g_variant_builder_end (&builder);
10295 static gboolean _foo_igen_rocket123_emit_changed (gpointer user_data);
10298 foo_igen_rocket123_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
10300 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (_skeleton);
10301 gboolean emit_changed = FALSE;
10303 g_mutex_lock (&skeleton->priv->lock);
10304 if (skeleton->priv->changed_properties_idle_source != NULL)
10306 g_source_destroy (skeleton->priv->changed_properties_idle_source);
10307 skeleton->priv->changed_properties_idle_source = NULL;
10308 emit_changed = TRUE;
10310 g_mutex_unlock (&skeleton->priv->lock);
10313 _foo_igen_rocket123_emit_changed (skeleton);
10317 _foo_igen_rocket123_on_signal_exploded_xyz (
10318 FooiGenRocket123 *object)
10320 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10322 GList *connections, *l;
10323 GVariant *signal_variant;
10324 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
10326 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
10327 for (l = connections; l != NULL; l = l->next)
10329 GDBusConnection *connection = l->data;
10330 g_dbus_connection_emit_signal (connection,
10331 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.acme.Rocket", "Exploded",
10332 signal_variant, NULL);
10334 g_variant_unref (signal_variant);
10335 g_list_free_full (connections, g_object_unref);
10338 static void foo_igen_rocket123_skeleton_iface_init (FooiGenRocket123Iface *iface);
10339 G_DEFINE_TYPE_WITH_CODE (FooiGenRocket123Skeleton, foo_igen_rocket123_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
10340 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_ROCKET123, foo_igen_rocket123_skeleton_iface_init));
10343 foo_igen_rocket123_skeleton_finalize (GObject *object)
10345 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10347 for (n = 0; n < 3; n++)
10348 g_value_unset (&skeleton->priv->properties[n]);
10349 g_free (skeleton->priv->properties);
10350 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
10351 if (skeleton->priv->changed_properties_idle_source != NULL)
10352 g_source_destroy (skeleton->priv->changed_properties_idle_source);
10353 g_main_context_unref (skeleton->priv->context);
10354 g_mutex_clear (&skeleton->priv->lock);
10355 G_OBJECT_CLASS (foo_igen_rocket123_skeleton_parent_class)->finalize (object);
10359 foo_igen_rocket123_skeleton_get_property (GObject *object,
10364 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10365 g_assert (prop_id != 0 && prop_id - 1 < 3);
10366 g_mutex_lock (&skeleton->priv->lock);
10367 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
10368 g_mutex_unlock (&skeleton->priv->lock);
10372 _foo_igen_rocket123_emit_changed (gpointer user_data)
10374 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (user_data);
10376 GVariantBuilder builder;
10377 GVariantBuilder invalidated_builder;
10380 g_mutex_lock (&skeleton->priv->lock);
10381 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
10382 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
10383 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
10385 ChangedProperty *cp = l->data;
10387 const GValue *cur_value;
10389 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
10390 if (!_g_value_equal (cur_value, &cp->orig_value))
10392 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
10393 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
10394 g_variant_unref (variant);
10398 if (num_changes > 0)
10400 GList *connections, *l;
10401 GVariant *signal_variant;
10402 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "com.acme.Rocket",
10403 &builder, &invalidated_builder));
10404 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
10405 for (l = connections; l != NULL; l = l->next)
10407 GDBusConnection *connection = l->data;
10409 g_dbus_connection_emit_signal (connection,
10410 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
10411 "org.freedesktop.DBus.Properties",
10412 "PropertiesChanged",
10416 g_variant_unref (signal_variant);
10417 g_list_free_full (connections, g_object_unref);
10421 g_variant_builder_clear (&builder);
10422 g_variant_builder_clear (&invalidated_builder);
10424 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
10425 skeleton->priv->changed_properties = NULL;
10426 skeleton->priv->changed_properties_idle_source = NULL;
10427 g_mutex_unlock (&skeleton->priv->lock);
10432 _foo_igen_rocket123_schedule_emit_changed (FooiGenRocket123Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
10434 ChangedProperty *cp;
10437 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
10439 ChangedProperty *i_cp = l->data;
10440 if (i_cp->info == info)
10448 cp = g_new0 (ChangedProperty, 1);
10449 cp->prop_id = prop_id;
10451 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
10452 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
10453 g_value_copy (orig_value, &cp->orig_value);
10458 foo_igen_rocket123_skeleton_notify (GObject *object,
10461 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10462 g_mutex_lock (&skeleton->priv->lock);
10463 if (skeleton->priv->changed_properties != NULL &&
10464 skeleton->priv->changed_properties_idle_source == NULL)
10466 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
10467 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
10468 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_rocket123_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
10469 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
10470 g_source_unref (skeleton->priv->changed_properties_idle_source);
10472 g_mutex_unlock (&skeleton->priv->lock);
10476 foo_igen_rocket123_skeleton_set_property (GObject *object,
10478 const GValue *value,
10481 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10482 g_assert (prop_id != 0 && prop_id - 1 < 3);
10483 g_mutex_lock (&skeleton->priv->lock);
10484 g_object_freeze_notify (object);
10485 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
10487 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
10488 _foo_igen_rocket123_schedule_emit_changed (skeleton, _foo_igen_rocket123_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
10489 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
10490 g_object_notify_by_pspec (object, pspec);
10492 g_mutex_unlock (&skeleton->priv->lock);
10493 g_object_thaw_notify (object);
10497 foo_igen_rocket123_skeleton_init (FooiGenRocket123Skeleton *skeleton)
10499 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_ROCKET123_SKELETON, FooiGenRocket123SkeletonPrivate);
10500 g_mutex_init (&skeleton->priv->lock);
10501 skeleton->priv->context = g_main_context_ref_thread_default ();
10502 skeleton->priv->properties = g_new0 (GValue, 3);
10503 g_value_init (&skeleton->priv->properties[0], G_TYPE_DOUBLE);
10504 g_value_init (&skeleton->priv->properties[1], G_TYPE_VARIANT);
10505 g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
10509 foo_igen_rocket123_skeleton_get_speed_xyz (FooiGenRocket123 *object)
10511 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10513 g_mutex_lock (&skeleton->priv->lock);
10514 value = g_value_get_double (&(skeleton->priv->properties[0]));
10515 g_mutex_unlock (&skeleton->priv->lock);
10520 foo_igen_rocket123_skeleton_get_direction (FooiGenRocket123 *object)
10522 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10524 g_mutex_lock (&skeleton->priv->lock);
10525 value = g_value_get_variant (&(skeleton->priv->properties[1]));
10526 g_mutex_unlock (&skeleton->priv->lock);
10530 static const gchar *
10531 foo_igen_rocket123_skeleton_get_type_ (FooiGenRocket123 *object)
10533 FooiGenRocket123Skeleton *skeleton = FOO_IGEN_ROCKET123_SKELETON (object);
10534 const gchar *value;
10535 g_mutex_lock (&skeleton->priv->lock);
10536 value = g_value_get_string (&(skeleton->priv->properties[2]));
10537 g_mutex_unlock (&skeleton->priv->lock);
10542 foo_igen_rocket123_skeleton_class_init (FooiGenRocket123SkeletonClass *klass)
10544 GObjectClass *gobject_class;
10545 GDBusInterfaceSkeletonClass *skeleton_class;
10547 g_type_class_add_private (klass, sizeof (FooiGenRocket123SkeletonPrivate));
10549 gobject_class = G_OBJECT_CLASS (klass);
10550 gobject_class->finalize = foo_igen_rocket123_skeleton_finalize;
10551 gobject_class->get_property = foo_igen_rocket123_skeleton_get_property;
10552 gobject_class->set_property = foo_igen_rocket123_skeleton_set_property;
10553 gobject_class->notify = foo_igen_rocket123_skeleton_notify;
10556 foo_igen_rocket123_override_properties (gobject_class, 1);
10558 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
10559 skeleton_class->get_info = foo_igen_rocket123_skeleton_dbus_interface_get_info;
10560 skeleton_class->get_properties = foo_igen_rocket123_skeleton_dbus_interface_get_properties;
10561 skeleton_class->flush = foo_igen_rocket123_skeleton_dbus_interface_flush;
10562 skeleton_class->get_vtable = foo_igen_rocket123_skeleton_dbus_interface_get_vtable;
10566 foo_igen_rocket123_skeleton_iface_init (FooiGenRocket123Iface *iface)
10568 iface->exploded_xyz = _foo_igen_rocket123_on_signal_exploded_xyz;
10569 iface->get_speed_xyz = foo_igen_rocket123_skeleton_get_speed_xyz;
10570 iface->get_direction = foo_igen_rocket123_skeleton_get_direction;
10571 iface->get_type_ = foo_igen_rocket123_skeleton_get_type_;
10575 * foo_igen_rocket123_skeleton_new:
10577 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link>.
10579 * Returns: (transfer full) (type FooiGenRocket123Skeleton): The skeleton object.
10582 foo_igen_rocket123_skeleton_new (void)
10584 return FOO_IGEN_ROCKET123 (g_object_new (FOO_IGEN_TYPE_ROCKET123_SKELETON, NULL));
10587 /* ------------------------------------------------------------------------
10588 * Code for interface org.project.Bat
10589 * ------------------------------------------------------------------------
10593 * SECTION:FooiGenBat
10594 * @title: FooiGenBat
10595 * @short_description: Generated C code for the org.project.Bat D-Bus interface
10597 * This section contains code for working with the <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link> D-Bus interface in C.
10600 /* ---- Introspection data for org.project.Bat ---- */
10602 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_IN_ARG_force_in_i =
10613 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_IN_ARG_force_in_s =
10624 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_IN_ARG_force_in_ay =
10635 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_IN_ARG_force_in_struct =
10646 static const _ExtendedGDBusArgInfo * const _foo_igen_bat_method_info_force_method_IN_ARG_pointers[] =
10648 &_foo_igen_bat_method_info_force_method_IN_ARG_force_in_i,
10649 &_foo_igen_bat_method_info_force_method_IN_ARG_force_in_s,
10650 &_foo_igen_bat_method_info_force_method_IN_ARG_force_in_ay,
10651 &_foo_igen_bat_method_info_force_method_IN_ARG_force_in_struct,
10655 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_OUT_ARG_force_out_i =
10666 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_OUT_ARG_force_out_s =
10677 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_OUT_ARG_force_out_ay =
10688 static const _ExtendedGDBusArgInfo _foo_igen_bat_method_info_force_method_OUT_ARG_force_out_struct =
10692 "force_out_struct",
10699 static const _ExtendedGDBusArgInfo * const _foo_igen_bat_method_info_force_method_OUT_ARG_pointers[] =
10701 &_foo_igen_bat_method_info_force_method_OUT_ARG_force_out_i,
10702 &_foo_igen_bat_method_info_force_method_OUT_ARG_force_out_s,
10703 &_foo_igen_bat_method_info_force_method_OUT_ARG_force_out_ay,
10704 &_foo_igen_bat_method_info_force_method_OUT_ARG_force_out_struct,
10708 static const _ExtendedGDBusMethodInfo _foo_igen_bat_method_info_force_method =
10713 (GDBusArgInfo **) &_foo_igen_bat_method_info_force_method_IN_ARG_pointers,
10714 (GDBusArgInfo **) &_foo_igen_bat_method_info_force_method_OUT_ARG_pointers,
10717 "handle-force-method",
10721 static const _ExtendedGDBusMethodInfo * const _foo_igen_bat_method_info_pointers[] =
10723 &_foo_igen_bat_method_info_force_method,
10727 static const _ExtendedGDBusArgInfo _foo_igen_bat_signal_info_force_signal_ARG_force_i =
10738 static const _ExtendedGDBusArgInfo _foo_igen_bat_signal_info_force_signal_ARG_force_s =
10749 static const _ExtendedGDBusArgInfo _foo_igen_bat_signal_info_force_signal_ARG_force_ay =
10760 static const _ExtendedGDBusArgInfo _foo_igen_bat_signal_info_force_signal_ARG_force_struct =
10771 static const _ExtendedGDBusArgInfo * const _foo_igen_bat_signal_info_force_signal_ARG_pointers[] =
10773 &_foo_igen_bat_signal_info_force_signal_ARG_force_i,
10774 &_foo_igen_bat_signal_info_force_signal_ARG_force_s,
10775 &_foo_igen_bat_signal_info_force_signal_ARG_force_ay,
10776 &_foo_igen_bat_signal_info_force_signal_ARG_force_struct,
10780 static const _ExtendedGDBusSignalInfo _foo_igen_bat_signal_info_force_signal =
10785 (GDBusArgInfo **) &_foo_igen_bat_signal_info_force_signal_ARG_pointers,
10791 static const _ExtendedGDBusSignalInfo * const _foo_igen_bat_signal_info_pointers[] =
10793 &_foo_igen_bat_signal_info_force_signal,
10797 static const _ExtendedGDBusPropertyInfo _foo_igen_bat_property_info_force_i =
10803 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
10810 static const _ExtendedGDBusPropertyInfo _foo_igen_bat_property_info_force_s =
10816 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
10823 static const _ExtendedGDBusPropertyInfo _foo_igen_bat_property_info_force_ay =
10829 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
10836 static const _ExtendedGDBusPropertyInfo _foo_igen_bat_property_info_force_struct =
10842 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
10849 static const _ExtendedGDBusPropertyInfo * const _foo_igen_bat_property_info_pointers[] =
10851 &_foo_igen_bat_property_info_force_i,
10852 &_foo_igen_bat_property_info_force_s,
10853 &_foo_igen_bat_property_info_force_ay,
10854 &_foo_igen_bat_property_info_force_struct,
10858 static const _ExtendedGDBusInterfaceInfo _foo_igen_bat_interface_info =
10863 (GDBusMethodInfo **) &_foo_igen_bat_method_info_pointers,
10864 (GDBusSignalInfo **) &_foo_igen_bat_signal_info_pointers,
10865 (GDBusPropertyInfo **) &_foo_igen_bat_property_info_pointers,
10873 * foo_igen_bat_interface_info:
10875 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link> D-Bus interface.
10877 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
10879 GDBusInterfaceInfo *
10880 foo_igen_bat_interface_info (void)
10882 return (GDBusInterfaceInfo *) &_foo_igen_bat_interface_info;
10886 * foo_igen_bat_override_properties:
10887 * @klass: The class structure for a #GObject<!-- -->-derived class.
10888 * @property_id_begin: The property id to assign to the first overridden property.
10890 * Overrides all #GObject properties in the #FooiGenBat interface for a concrete class.
10891 * The properties are overridden in the order they are defined.
10893 * Returns: The last property id.
10896 foo_igen_bat_override_properties (GObjectClass *klass, guint property_id_begin)
10898 g_object_class_override_property (klass, property_id_begin++, "force-i");
10899 g_object_class_override_property (klass, property_id_begin++, "force-s");
10900 g_object_class_override_property (klass, property_id_begin++, "force-ay");
10901 g_object_class_override_property (klass, property_id_begin++, "force-struct");
10902 return property_id_begin - 1;
10910 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link>.
10915 * @parent_iface: The parent interface.
10916 * @handle_force_method: Handler for the #FooiGenBat::handle-force-method signal.
10917 * @get_force_ay: Getter for the #FooiGenBat:force-ay property.
10918 * @get_force_i: Getter for the #FooiGenBat:force-i property.
10919 * @get_force_s: Getter for the #FooiGenBat:force-s property.
10920 * @get_force_struct: Getter for the #FooiGenBat:force-struct property.
10921 * @force_signal: Handler for the #FooiGenBat::force-signal signal.
10923 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link>.
10927 foo_igen_bat_default_init (FooiGenBatIface *iface)
10929 /* GObject signals for incoming D-Bus method calls: */
10931 * FooiGenBat::handle-force-method:
10932 * @object: A #FooiGenBat.
10933 * @invocation: A #GDBusMethodInvocation.
10934 * @arg_force_in_i: Argument passed by remote caller.
10935 * @arg_force_in_s: Argument passed by remote caller.
10936 * @arg_force_in_ay: Argument passed by remote caller.
10937 * @arg_force_in_struct: Argument passed by remote caller.
10939 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Bat.ForceMethod">ForceMethod()</link> D-Bus method.
10941 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_bat_complete_force_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
10943 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
10945 g_signal_new ("handle-force-method",
10946 G_TYPE_FROM_INTERFACE (iface),
10948 G_STRUCT_OFFSET (FooiGenBatIface, handle_force_method),
10949 g_signal_accumulator_true_handled,
10951 g_cclosure_marshal_generic,
10954 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT);
10956 /* GObject signals for received D-Bus signals: */
10958 * FooiGenBat::force-signal:
10959 * @object: A #FooiGenBat.
10960 * @arg_force_i: Argument.
10961 * @arg_force_s: Argument.
10962 * @arg_force_ay: Argument.
10963 * @arg_force_struct: Argument.
10965 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-project-Bat.ForceSignal">"ForceSignal"</link> is received.
10967 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
10969 g_signal_new ("force-signal",
10970 G_TYPE_FROM_INTERFACE (iface),
10972 G_STRUCT_OFFSET (FooiGenBatIface, force_signal),
10975 g_cclosure_marshal_generic,
10977 4, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_VARIANT);
10979 /* GObject properties for D-Bus properties: */
10981 * FooiGenBat:force-i:
10983 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bat.force_i">"force_i"</link>.
10985 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
10987 g_object_interface_install_property (iface,
10988 g_param_spec_variant ("force-i", "force_i", "force_i", G_VARIANT_TYPE ("i"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
10990 * FooiGenBat:force-s:
10992 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bat.force_s">"force_s"</link>.
10994 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
10996 g_object_interface_install_property (iface,
10997 g_param_spec_variant ("force-s", "force_s", "force_s", G_VARIANT_TYPE ("s"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
10999 * FooiGenBat:force-ay:
11001 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bat.force_ay">"force_ay"</link>.
11003 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
11005 g_object_interface_install_property (iface,
11006 g_param_spec_variant ("force-ay", "force_ay", "force_ay", G_VARIANT_TYPE ("ay"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
11008 * FooiGenBat:force-struct:
11010 * Represents the D-Bus property <link linkend="gdbus-property-org-project-Bat.force_struct">"force_struct"</link>.
11012 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
11014 g_object_interface_install_property (iface,
11015 g_param_spec_variant ("force-struct", "force_struct", "force_struct", G_VARIANT_TYPE ("(i)"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
11018 typedef FooiGenBatIface FooiGenBatInterface;
11019 G_DEFINE_INTERFACE (FooiGenBat, foo_igen_bat, G_TYPE_OBJECT);
11022 * foo_igen_bat_get_force_i: (skip)
11023 * @object: A #FooiGenBat.
11025 * Gets the value of the <link linkend="gdbus-property-org-project-Bat.force_i">"force_i"</link> D-Bus property.
11027 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11029 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bat_dup_force_i() if on another thread.</warning>
11031 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
11034 foo_igen_bat_get_force_i (FooiGenBat *object)
11036 return FOO_IGEN_BAT_GET_IFACE (object)->get_force_i (object);
11040 * foo_igen_bat_dup_force_i: (skip)
11041 * @object: A #FooiGenBat.
11043 * Gets a copy of the <link linkend="gdbus-property-org-project-Bat.force_i">"force_i"</link> D-Bus property.
11045 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11047 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
11050 foo_igen_bat_dup_force_i (FooiGenBat *object)
11053 g_object_get (G_OBJECT (object), "force-i", &value, NULL);
11058 * foo_igen_bat_set_force_i: (skip)
11059 * @object: A #FooiGenBat.
11060 * @value: The value to set.
11062 * Sets the <link linkend="gdbus-property-org-project-Bat.force_i">"force_i"</link> D-Bus property to @value.
11064 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11067 foo_igen_bat_set_force_i (FooiGenBat *object, GVariant *value)
11069 g_object_set (G_OBJECT (object), "force-i", value, NULL);
11073 * foo_igen_bat_get_force_s: (skip)
11074 * @object: A #FooiGenBat.
11076 * Gets the value of the <link linkend="gdbus-property-org-project-Bat.force_s">"force_s"</link> D-Bus property.
11078 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11080 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bat_dup_force_s() if on another thread.</warning>
11082 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
11085 foo_igen_bat_get_force_s (FooiGenBat *object)
11087 return FOO_IGEN_BAT_GET_IFACE (object)->get_force_s (object);
11091 * foo_igen_bat_dup_force_s: (skip)
11092 * @object: A #FooiGenBat.
11094 * Gets a copy of the <link linkend="gdbus-property-org-project-Bat.force_s">"force_s"</link> D-Bus property.
11096 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11098 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
11101 foo_igen_bat_dup_force_s (FooiGenBat *object)
11104 g_object_get (G_OBJECT (object), "force-s", &value, NULL);
11109 * foo_igen_bat_set_force_s: (skip)
11110 * @object: A #FooiGenBat.
11111 * @value: The value to set.
11113 * Sets the <link linkend="gdbus-property-org-project-Bat.force_s">"force_s"</link> D-Bus property to @value.
11115 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11118 foo_igen_bat_set_force_s (FooiGenBat *object, GVariant *value)
11120 g_object_set (G_OBJECT (object), "force-s", value, NULL);
11124 * foo_igen_bat_get_force_ay: (skip)
11125 * @object: A #FooiGenBat.
11127 * Gets the value of the <link linkend="gdbus-property-org-project-Bat.force_ay">"force_ay"</link> D-Bus property.
11129 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11131 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bat_dup_force_ay() if on another thread.</warning>
11133 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
11136 foo_igen_bat_get_force_ay (FooiGenBat *object)
11138 return FOO_IGEN_BAT_GET_IFACE (object)->get_force_ay (object);
11142 * foo_igen_bat_dup_force_ay: (skip)
11143 * @object: A #FooiGenBat.
11145 * Gets a copy of the <link linkend="gdbus-property-org-project-Bat.force_ay">"force_ay"</link> D-Bus property.
11147 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11149 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
11152 foo_igen_bat_dup_force_ay (FooiGenBat *object)
11155 g_object_get (G_OBJECT (object), "force-ay", &value, NULL);
11160 * foo_igen_bat_set_force_ay: (skip)
11161 * @object: A #FooiGenBat.
11162 * @value: The value to set.
11164 * Sets the <link linkend="gdbus-property-org-project-Bat.force_ay">"force_ay"</link> D-Bus property to @value.
11166 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11169 foo_igen_bat_set_force_ay (FooiGenBat *object, GVariant *value)
11171 g_object_set (G_OBJECT (object), "force-ay", value, NULL);
11175 * foo_igen_bat_get_force_struct: (skip)
11176 * @object: A #FooiGenBat.
11178 * Gets the value of the <link linkend="gdbus-property-org-project-Bat.force_struct">"force_struct"</link> D-Bus property.
11180 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11182 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_bat_dup_force_struct() if on another thread.</warning>
11184 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
11187 foo_igen_bat_get_force_struct (FooiGenBat *object)
11189 return FOO_IGEN_BAT_GET_IFACE (object)->get_force_struct (object);
11193 * foo_igen_bat_dup_force_struct: (skip)
11194 * @object: A #FooiGenBat.
11196 * Gets a copy of the <link linkend="gdbus-property-org-project-Bat.force_struct">"force_struct"</link> D-Bus property.
11198 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11200 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
11203 foo_igen_bat_dup_force_struct (FooiGenBat *object)
11206 g_object_get (G_OBJECT (object), "force-struct", &value, NULL);
11211 * foo_igen_bat_set_force_struct: (skip)
11212 * @object: A #FooiGenBat.
11213 * @value: The value to set.
11215 * Sets the <link linkend="gdbus-property-org-project-Bat.force_struct">"force_struct"</link> D-Bus property to @value.
11217 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
11220 foo_igen_bat_set_force_struct (FooiGenBat *object, GVariant *value)
11222 g_object_set (G_OBJECT (object), "force-struct", value, NULL);
11226 * foo_igen_bat_emit_force_signal:
11227 * @object: A #FooiGenBat.
11228 * @arg_force_i: Argument to pass with the signal.
11229 * @arg_force_s: Argument to pass with the signal.
11230 * @arg_force_ay: Argument to pass with the signal.
11231 * @arg_force_struct: Argument to pass with the signal.
11233 * Emits the <link linkend="gdbus-signal-org-project-Bat.ForceSignal">"ForceSignal"</link> D-Bus signal.
11236 foo_igen_bat_emit_force_signal (
11237 FooiGenBat *object,
11238 GVariant *arg_force_i,
11239 GVariant *arg_force_s,
11240 GVariant *arg_force_ay,
11241 GVariant *arg_force_struct)
11243 g_signal_emit_by_name (object, "force-signal", arg_force_i, arg_force_s, arg_force_ay, arg_force_struct);
11247 * foo_igen_bat_call_force_method:
11248 * @proxy: A #FooiGenBatProxy.
11249 * @arg_force_in_i: Argument to pass with the method invocation.
11250 * @arg_force_in_s: Argument to pass with the method invocation.
11251 * @arg_force_in_ay: Argument to pass with the method invocation.
11252 * @arg_force_in_struct: Argument to pass with the method invocation.
11253 * @cancellable: (allow-none): A #GCancellable or %NULL.
11254 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
11255 * @user_data: User data to pass to @callback.
11257 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Bat.ForceMethod">ForceMethod()</link> D-Bus method on @proxy.
11258 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
11259 * You can then call foo_igen_bat_call_force_method_finish() to get the result of the operation.
11261 * See foo_igen_bat_call_force_method_sync() for the synchronous, blocking version of this method.
11264 foo_igen_bat_call_force_method (
11266 GVariant *arg_force_in_i,
11267 GVariant *arg_force_in_s,
11268 GVariant *arg_force_in_ay,
11269 GVariant *arg_force_in_struct,
11270 GCancellable *cancellable,
11271 GAsyncReadyCallback callback,
11272 gpointer user_data)
11274 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
11276 g_variant_new ("(@i@s@ay@(i))",
11280 arg_force_in_struct),
11281 G_DBUS_CALL_FLAGS_NONE,
11289 * foo_igen_bat_call_force_method_finish:
11290 * @proxy: A #FooiGenBatProxy.
11291 * @out_force_out_i: (out): Return location for return parameter or %NULL to ignore.
11292 * @out_force_out_s: (out): Return location for return parameter or %NULL to ignore.
11293 * @out_force_out_ay: (out): Return location for return parameter or %NULL to ignore.
11294 * @out_force_out_struct: (out): Return location for return parameter or %NULL to ignore.
11295 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bat_call_force_method().
11296 * @error: Return location for error or %NULL.
11298 * Finishes an operation started with foo_igen_bat_call_force_method().
11300 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
11303 foo_igen_bat_call_force_method_finish (
11305 GVariant **out_force_out_i,
11306 GVariant **out_force_out_s,
11307 GVariant **out_force_out_ay,
11308 GVariant **out_force_out_struct,
11313 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
11316 g_variant_get (_ret,
11321 out_force_out_struct);
11322 g_variant_unref (_ret);
11324 return _ret != NULL;
11328 * foo_igen_bat_call_force_method_sync:
11329 * @proxy: A #FooiGenBatProxy.
11330 * @arg_force_in_i: Argument to pass with the method invocation.
11331 * @arg_force_in_s: Argument to pass with the method invocation.
11332 * @arg_force_in_ay: Argument to pass with the method invocation.
11333 * @arg_force_in_struct: Argument to pass with the method invocation.
11334 * @out_force_out_i: (out): Return location for return parameter or %NULL to ignore.
11335 * @out_force_out_s: (out): Return location for return parameter or %NULL to ignore.
11336 * @out_force_out_ay: (out): Return location for return parameter or %NULL to ignore.
11337 * @out_force_out_struct: (out): Return location for return parameter or %NULL to ignore.
11338 * @cancellable: (allow-none): A #GCancellable or %NULL.
11339 * @error: Return location for error or %NULL.
11341 * Synchronously invokes the <link linkend="gdbus-method-org-project-Bat.ForceMethod">ForceMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
11343 * See foo_igen_bat_call_force_method() for the asynchronous version of this method.
11345 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
11348 foo_igen_bat_call_force_method_sync (
11350 GVariant *arg_force_in_i,
11351 GVariant *arg_force_in_s,
11352 GVariant *arg_force_in_ay,
11353 GVariant *arg_force_in_struct,
11354 GVariant **out_force_out_i,
11355 GVariant **out_force_out_s,
11356 GVariant **out_force_out_ay,
11357 GVariant **out_force_out_struct,
11358 GCancellable *cancellable,
11362 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
11364 g_variant_new ("(@i@s@ay@(i))",
11368 arg_force_in_struct),
11369 G_DBUS_CALL_FLAGS_NONE,
11375 g_variant_get (_ret,
11380 out_force_out_struct);
11381 g_variant_unref (_ret);
11383 return _ret != NULL;
11387 * foo_igen_bat_complete_force_method:
11388 * @object: A #FooiGenBat.
11389 * @invocation: (transfer full): A #GDBusMethodInvocation.
11390 * @force_out_i: Parameter to return.
11391 * @force_out_s: Parameter to return.
11392 * @force_out_ay: Parameter to return.
11393 * @force_out_struct: Parameter to return.
11395 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Bat.ForceMethod">ForceMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
11397 * This method will free @invocation, you cannot use it afterwards.
11400 foo_igen_bat_complete_force_method (
11401 FooiGenBat *object,
11402 GDBusMethodInvocation *invocation,
11403 GVariant *force_out_i,
11404 GVariant *force_out_s,
11405 GVariant *force_out_ay,
11406 GVariant *force_out_struct)
11408 g_dbus_method_invocation_return_value (invocation,
11409 g_variant_new ("(@i@s@ay@(i))",
11413 force_out_struct));
11416 /* ------------------------------------------------------------------------ */
11421 * The #FooiGenBatProxy structure contains only private data and should only be accessed using the provided API.
11425 * FooiGenBatProxyClass:
11426 * @parent_class: The parent class.
11428 * Class structure for #FooiGenBatProxy.
11431 struct _FooiGenBatProxyPrivate
11436 static void foo_igen_bat_proxy_iface_init (FooiGenBatIface *iface);
11438 G_DEFINE_TYPE_WITH_CODE (FooiGenBatProxy, foo_igen_bat_proxy, G_TYPE_DBUS_PROXY,
11439 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAT, foo_igen_bat_proxy_iface_init));
11442 foo_igen_bat_proxy_finalize (GObject *object)
11444 FooiGenBatProxy *proxy = FOO_IGEN_BAT_PROXY (object);
11445 g_datalist_clear (&proxy->priv->qdata);
11446 G_OBJECT_CLASS (foo_igen_bat_proxy_parent_class)->finalize (object);
11450 foo_igen_bat_proxy_get_property (GObject *object,
11455 const _ExtendedGDBusPropertyInfo *info;
11457 g_assert (prop_id != 0 && prop_id - 1 < 4);
11458 info = _foo_igen_bat_property_info_pointers[prop_id - 1];
11459 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
11460 if (info->use_gvariant)
11462 g_value_set_variant (value, variant);
11466 if (variant != NULL)
11467 g_dbus_gvariant_to_gvalue (variant, value);
11469 if (variant != NULL)
11470 g_variant_unref (variant);
11474 foo_igen_bat_proxy_set_property_cb (GDBusProxy *proxy,
11476 gpointer user_data)
11478 const _ExtendedGDBusPropertyInfo *info = user_data;
11481 if (!g_dbus_proxy_call_finish (proxy, res, &error))
11483 g_warning ("Error setting property `%s' on interface org.project.Bat: %s (%s, %d)",
11484 info->parent_struct.name,
11485 error->message, g_quark_to_string (error->domain), error->code);
11486 g_error_free (error);
11491 foo_igen_bat_proxy_set_property (GObject *object,
11493 const GValue *value,
11496 const _ExtendedGDBusPropertyInfo *info;
11498 g_assert (prop_id != 0 && prop_id - 1 < 4);
11499 info = _foo_igen_bat_property_info_pointers[prop_id - 1];
11500 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
11501 g_dbus_proxy_call (G_DBUS_PROXY (object),
11502 "org.freedesktop.DBus.Properties.Set",
11503 g_variant_new ("(ssv)", "org.project.Bat", info->parent_struct.name, variant),
11504 G_DBUS_CALL_FLAGS_NONE,
11506 NULL, (GAsyncReadyCallback) foo_igen_bat_proxy_set_property_cb, (gpointer) info);
11507 g_variant_unref (variant);
11511 foo_igen_bat_proxy_g_signal (GDBusProxy *proxy,
11512 const gchar *sender_name,
11513 const gchar *signal_name,
11514 GVariant *parameters)
11516 _ExtendedGDBusSignalInfo *info;
11523 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_bat_interface_info, signal_name);
11526 num_params = g_variant_n_children (parameters);
11527 paramv = g_new0 (GValue, num_params + 1);
11528 g_value_init (¶mv[0], FOO_IGEN_TYPE_BAT);
11529 g_value_set_object (¶mv[0], proxy);
11530 g_variant_iter_init (&iter, parameters);
11532 while ((child = g_variant_iter_next_value (&iter)) != NULL)
11534 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
11535 if (arg_info->use_gvariant)
11537 g_value_init (¶mv[n], G_TYPE_VARIANT);
11538 g_value_set_variant (¶mv[n], child);
11542 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
11543 g_variant_unref (child);
11545 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAT);
11546 g_signal_emitv (paramv, signal_id, 0, NULL);
11547 for (n = 0; n < num_params + 1; n++)
11548 g_value_unset (¶mv[n]);
11553 foo_igen_bat_proxy_g_properties_changed (GDBusProxy *_proxy,
11554 GVariant *changed_properties,
11555 const gchar *const *invalidated_properties)
11557 FooiGenBatProxy *proxy = FOO_IGEN_BAT_PROXY (_proxy);
11560 GVariantIter *iter;
11561 _ExtendedGDBusPropertyInfo *info;
11562 g_variant_get (changed_properties, "a{sv}", &iter);
11563 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
11565 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bat_interface_info, key);
11566 g_datalist_remove_data (&proxy->priv->qdata, key);
11568 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
11570 g_variant_iter_free (iter);
11571 for (n = 0; invalidated_properties[n] != NULL; n++)
11573 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bat_interface_info, invalidated_properties[n]);
11574 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
11576 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
11581 foo_igen_bat_proxy_get_force_i (FooiGenBat *object)
11583 FooiGenBatProxy *proxy = FOO_IGEN_BAT_PROXY (object);
11585 GVariant *value = NULL;
11586 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "force_i");
11588 if (variant != NULL)
11589 g_variant_unref (variant);
11594 foo_igen_bat_proxy_get_force_s (FooiGenBat *object)
11596 FooiGenBatProxy *proxy = FOO_IGEN_BAT_PROXY (object);
11598 GVariant *value = NULL;
11599 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "force_s");
11601 if (variant != NULL)
11602 g_variant_unref (variant);
11607 foo_igen_bat_proxy_get_force_ay (FooiGenBat *object)
11609 FooiGenBatProxy *proxy = FOO_IGEN_BAT_PROXY (object);
11611 GVariant *value = NULL;
11612 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "force_ay");
11614 if (variant != NULL)
11615 g_variant_unref (variant);
11620 foo_igen_bat_proxy_get_force_struct (FooiGenBat *object)
11622 FooiGenBatProxy *proxy = FOO_IGEN_BAT_PROXY (object);
11624 GVariant *value = NULL;
11625 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "force_struct");
11627 if (variant != NULL)
11628 g_variant_unref (variant);
11633 foo_igen_bat_proxy_init (FooiGenBatProxy *proxy)
11635 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_BAT_PROXY, FooiGenBatProxyPrivate);
11636 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_bat_interface_info ());
11640 foo_igen_bat_proxy_class_init (FooiGenBatProxyClass *klass)
11642 GObjectClass *gobject_class;
11643 GDBusProxyClass *proxy_class;
11645 g_type_class_add_private (klass, sizeof (FooiGenBatProxyPrivate));
11647 gobject_class = G_OBJECT_CLASS (klass);
11648 gobject_class->finalize = foo_igen_bat_proxy_finalize;
11649 gobject_class->get_property = foo_igen_bat_proxy_get_property;
11650 gobject_class->set_property = foo_igen_bat_proxy_set_property;
11652 proxy_class = G_DBUS_PROXY_CLASS (klass);
11653 proxy_class->g_signal = foo_igen_bat_proxy_g_signal;
11654 proxy_class->g_properties_changed = foo_igen_bat_proxy_g_properties_changed;
11657 foo_igen_bat_override_properties (gobject_class, 1);
11661 foo_igen_bat_proxy_iface_init (FooiGenBatIface *iface)
11663 iface->get_force_i = foo_igen_bat_proxy_get_force_i;
11664 iface->get_force_s = foo_igen_bat_proxy_get_force_s;
11665 iface->get_force_ay = foo_igen_bat_proxy_get_force_ay;
11666 iface->get_force_struct = foo_igen_bat_proxy_get_force_struct;
11670 * foo_igen_bat_proxy_new:
11671 * @connection: A #GDBusConnection.
11672 * @flags: Flags from the #GDBusProxyFlags enumeration.
11673 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
11674 * @object_path: An object path.
11675 * @cancellable: (allow-none): A #GCancellable or %NULL.
11676 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
11677 * @user_data: User data to pass to @callback.
11679 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link>. See g_dbus_proxy_new() for more details.
11681 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
11682 * You can then call foo_igen_bat_proxy_new_finish() to get the result of the operation.
11684 * See foo_igen_bat_proxy_new_sync() for the synchronous, blocking version of this constructor.
11687 foo_igen_bat_proxy_new (
11688 GDBusConnection *connection,
11689 GDBusProxyFlags flags,
11691 const gchar *object_path,
11692 GCancellable *cancellable,
11693 GAsyncReadyCallback callback,
11694 gpointer user_data)
11696 g_async_initable_new_async (FOO_IGEN_TYPE_BAT_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.Bat", NULL);
11700 * foo_igen_bat_proxy_new_finish:
11701 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bat_proxy_new().
11702 * @error: Return location for error or %NULL
11704 * Finishes an operation started with foo_igen_bat_proxy_new().
11706 * Returns: (transfer full) (type FooiGenBatProxy): The constructed proxy object or %NULL if @error is set.
11709 foo_igen_bat_proxy_new_finish (
11714 GObject *source_object;
11715 source_object = g_async_result_get_source_object (res);
11716 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
11717 g_object_unref (source_object);
11719 return FOO_IGEN_BAT (ret);
11725 * foo_igen_bat_proxy_new_sync:
11726 * @connection: A #GDBusConnection.
11727 * @flags: Flags from the #GDBusProxyFlags enumeration.
11728 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
11729 * @object_path: An object path.
11730 * @cancellable: (allow-none): A #GCancellable or %NULL.
11731 * @error: Return location for error or %NULL
11733 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link>. See g_dbus_proxy_new_sync() for more details.
11735 * The calling thread is blocked until a reply is received.
11737 * See foo_igen_bat_proxy_new() for the asynchronous version of this constructor.
11739 * Returns: (transfer full) (type FooiGenBatProxy): The constructed proxy object or %NULL if @error is set.
11742 foo_igen_bat_proxy_new_sync (
11743 GDBusConnection *connection,
11744 GDBusProxyFlags flags,
11746 const gchar *object_path,
11747 GCancellable *cancellable,
11751 ret = g_initable_new (FOO_IGEN_TYPE_BAT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.project.Bat", NULL);
11753 return FOO_IGEN_BAT (ret);
11760 * foo_igen_bat_proxy_new_for_bus:
11761 * @bus_type: A #GBusType.
11762 * @flags: Flags from the #GDBusProxyFlags enumeration.
11763 * @name: A bus name (well-known or unique).
11764 * @object_path: An object path.
11765 * @cancellable: (allow-none): A #GCancellable or %NULL.
11766 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
11767 * @user_data: User data to pass to @callback.
11769 * Like foo_igen_bat_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
11771 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
11772 * You can then call foo_igen_bat_proxy_new_for_bus_finish() to get the result of the operation.
11774 * See foo_igen_bat_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
11777 foo_igen_bat_proxy_new_for_bus (
11779 GDBusProxyFlags flags,
11781 const gchar *object_path,
11782 GCancellable *cancellable,
11783 GAsyncReadyCallback callback,
11784 gpointer user_data)
11786 g_async_initable_new_async (FOO_IGEN_TYPE_BAT_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.Bat", NULL);
11790 * foo_igen_bat_proxy_new_for_bus_finish:
11791 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_bat_proxy_new_for_bus().
11792 * @error: Return location for error or %NULL
11794 * Finishes an operation started with foo_igen_bat_proxy_new_for_bus().
11796 * Returns: (transfer full) (type FooiGenBatProxy): The constructed proxy object or %NULL if @error is set.
11799 foo_igen_bat_proxy_new_for_bus_finish (
11804 GObject *source_object;
11805 source_object = g_async_result_get_source_object (res);
11806 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
11807 g_object_unref (source_object);
11809 return FOO_IGEN_BAT (ret);
11815 * foo_igen_bat_proxy_new_for_bus_sync:
11816 * @bus_type: A #GBusType.
11817 * @flags: Flags from the #GDBusProxyFlags enumeration.
11818 * @name: A bus name (well-known or unique).
11819 * @object_path: An object path.
11820 * @cancellable: (allow-none): A #GCancellable or %NULL.
11821 * @error: Return location for error or %NULL
11823 * Like foo_igen_bat_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
11825 * The calling thread is blocked until a reply is received.
11827 * See foo_igen_bat_proxy_new_for_bus() for the asynchronous version of this constructor.
11829 * Returns: (transfer full) (type FooiGenBatProxy): The constructed proxy object or %NULL if @error is set.
11832 foo_igen_bat_proxy_new_for_bus_sync (
11834 GDBusProxyFlags flags,
11836 const gchar *object_path,
11837 GCancellable *cancellable,
11841 ret = g_initable_new (FOO_IGEN_TYPE_BAT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.project.Bat", NULL);
11843 return FOO_IGEN_BAT (ret);
11849 /* ------------------------------------------------------------------------ */
11852 * FooiGenBatSkeleton:
11854 * The #FooiGenBatSkeleton structure contains only private data and should only be accessed using the provided API.
11858 * FooiGenBatSkeletonClass:
11859 * @parent_class: The parent class.
11861 * Class structure for #FooiGenBatSkeleton.
11864 struct _FooiGenBatSkeletonPrivate
11866 GValue *properties;
11867 GList *changed_properties;
11868 GSource *changed_properties_idle_source;
11869 GMainContext *context;
11874 _foo_igen_bat_skeleton_handle_method_call (
11875 GDBusConnection *connection,
11876 const gchar *sender,
11877 const gchar *object_path,
11878 const gchar *interface_name,
11879 const gchar *method_name,
11880 GVariant *parameters,
11881 GDBusMethodInvocation *invocation,
11882 gpointer user_data)
11884 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (user_data);
11885 _ExtendedGDBusMethodInfo *info;
11893 GValue return_value = G_VALUE_INIT;
11894 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
11895 g_assert (info != NULL);
11896 num_params = g_variant_n_children (parameters);
11897 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
11899 g_value_init (¶mv[n], FOO_IGEN_TYPE_BAT);
11900 g_value_set_object (¶mv[n++], skeleton);
11901 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
11902 g_value_set_object (¶mv[n++], invocation);
11903 if (info->pass_fdlist)
11906 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
11907 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
11909 g_assert_not_reached ();
11912 g_variant_iter_init (&iter, parameters);
11913 while ((child = g_variant_iter_next_value (&iter)) != NULL)
11915 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
11916 if (arg_info->use_gvariant)
11918 g_value_init (¶mv[n], G_TYPE_VARIANT);
11919 g_value_set_variant (¶mv[n], child);
11923 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
11924 g_variant_unref (child);
11926 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_BAT);
11927 g_value_init (&return_value, G_TYPE_BOOLEAN);
11928 g_signal_emitv (paramv, signal_id, 0, &return_value);
11929 if (!g_value_get_boolean (&return_value))
11930 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
11931 g_value_unset (&return_value);
11932 for (n = 0; n < num_params + num_extra; n++)
11933 g_value_unset (¶mv[n]);
11938 _foo_igen_bat_skeleton_handle_get_property (
11939 GDBusConnection *connection,
11940 const gchar *sender,
11941 const gchar *object_path,
11942 const gchar *interface_name,
11943 const gchar *property_name,
11945 gpointer user_data)
11947 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (user_data);
11948 GValue value = G_VALUE_INIT;
11950 _ExtendedGDBusPropertyInfo *info;
11953 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bat_interface_info, property_name);
11954 g_assert (info != NULL);
11955 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
11958 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
11962 g_value_init (&value, pspec->value_type);
11963 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
11964 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
11965 g_value_unset (&value);
11971 _foo_igen_bat_skeleton_handle_set_property (
11972 GDBusConnection *connection,
11973 const gchar *sender,
11974 const gchar *object_path,
11975 const gchar *interface_name,
11976 const gchar *property_name,
11979 gpointer user_data)
11981 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (user_data);
11982 GValue value = G_VALUE_INIT;
11984 _ExtendedGDBusPropertyInfo *info;
11987 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_bat_interface_info, property_name);
11988 g_assert (info != NULL);
11989 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
11992 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
11996 if (info->use_gvariant)
11997 g_value_set_variant (&value, variant);
11999 g_dbus_gvariant_to_gvalue (variant, &value);
12000 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
12001 g_value_unset (&value);
12007 static const GDBusInterfaceVTable _foo_igen_bat_skeleton_vtable =
12009 _foo_igen_bat_skeleton_handle_method_call,
12010 _foo_igen_bat_skeleton_handle_get_property,
12011 _foo_igen_bat_skeleton_handle_set_property
12014 static GDBusInterfaceInfo *
12015 foo_igen_bat_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
12017 return foo_igen_bat_interface_info ();
12020 static GDBusInterfaceVTable *
12021 foo_igen_bat_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
12023 return (GDBusInterfaceVTable *) &_foo_igen_bat_skeleton_vtable;
12027 foo_igen_bat_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
12029 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (_skeleton);
12031 GVariantBuilder builder;
12033 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
12034 if (_foo_igen_bat_interface_info.parent_struct.properties == NULL)
12036 for (n = 0; _foo_igen_bat_interface_info.parent_struct.properties[n] != NULL; n++)
12038 GDBusPropertyInfo *info = _foo_igen_bat_interface_info.parent_struct.properties[n];
12039 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
12042 value = _foo_igen_bat_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Bat", info->name, NULL, skeleton);
12045 g_variant_take_ref (value);
12046 g_variant_builder_add (&builder, "{sv}", info->name, value);
12047 g_variant_unref (value);
12052 return g_variant_builder_end (&builder);
12055 static gboolean _foo_igen_bat_emit_changed (gpointer user_data);
12058 foo_igen_bat_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
12060 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (_skeleton);
12061 gboolean emit_changed = FALSE;
12063 g_mutex_lock (&skeleton->priv->lock);
12064 if (skeleton->priv->changed_properties_idle_source != NULL)
12066 g_source_destroy (skeleton->priv->changed_properties_idle_source);
12067 skeleton->priv->changed_properties_idle_source = NULL;
12068 emit_changed = TRUE;
12070 g_mutex_unlock (&skeleton->priv->lock);
12073 _foo_igen_bat_emit_changed (skeleton);
12077 _foo_igen_bat_on_signal_force_signal (
12078 FooiGenBat *object,
12079 GVariant *arg_force_i,
12080 GVariant *arg_force_s,
12081 GVariant *arg_force_ay,
12082 GVariant *arg_force_struct)
12084 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12086 GList *connections, *l;
12087 GVariant *signal_variant;
12088 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
12090 signal_variant = g_variant_ref_sink (g_variant_new ("(@i@s@ay@(i))",
12094 arg_force_struct));
12095 for (l = connections; l != NULL; l = l->next)
12097 GDBusConnection *connection = l->data;
12098 g_dbus_connection_emit_signal (connection,
12099 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Bat", "ForceSignal",
12100 signal_variant, NULL);
12102 g_variant_unref (signal_variant);
12103 g_list_free_full (connections, g_object_unref);
12106 static void foo_igen_bat_skeleton_iface_init (FooiGenBatIface *iface);
12107 G_DEFINE_TYPE_WITH_CODE (FooiGenBatSkeleton, foo_igen_bat_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
12108 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_BAT, foo_igen_bat_skeleton_iface_init));
12111 foo_igen_bat_skeleton_finalize (GObject *object)
12113 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12115 for (n = 0; n < 4; n++)
12116 g_value_unset (&skeleton->priv->properties[n]);
12117 g_free (skeleton->priv->properties);
12118 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
12119 if (skeleton->priv->changed_properties_idle_source != NULL)
12120 g_source_destroy (skeleton->priv->changed_properties_idle_source);
12121 g_main_context_unref (skeleton->priv->context);
12122 g_mutex_clear (&skeleton->priv->lock);
12123 G_OBJECT_CLASS (foo_igen_bat_skeleton_parent_class)->finalize (object);
12127 foo_igen_bat_skeleton_get_property (GObject *object,
12132 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12133 g_assert (prop_id != 0 && prop_id - 1 < 4);
12134 g_mutex_lock (&skeleton->priv->lock);
12135 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
12136 g_mutex_unlock (&skeleton->priv->lock);
12140 _foo_igen_bat_emit_changed (gpointer user_data)
12142 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (user_data);
12144 GVariantBuilder builder;
12145 GVariantBuilder invalidated_builder;
12148 g_mutex_lock (&skeleton->priv->lock);
12149 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
12150 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
12151 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
12153 ChangedProperty *cp = l->data;
12155 const GValue *cur_value;
12157 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
12158 if (!_g_value_equal (cur_value, &cp->orig_value))
12160 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
12161 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
12162 g_variant_unref (variant);
12166 if (num_changes > 0)
12168 GList *connections, *l;
12169 GVariant *signal_variant;
12170 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.project.Bat",
12171 &builder, &invalidated_builder));
12172 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
12173 for (l = connections; l != NULL; l = l->next)
12175 GDBusConnection *connection = l->data;
12177 g_dbus_connection_emit_signal (connection,
12178 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
12179 "org.freedesktop.DBus.Properties",
12180 "PropertiesChanged",
12184 g_variant_unref (signal_variant);
12185 g_list_free_full (connections, g_object_unref);
12189 g_variant_builder_clear (&builder);
12190 g_variant_builder_clear (&invalidated_builder);
12192 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
12193 skeleton->priv->changed_properties = NULL;
12194 skeleton->priv->changed_properties_idle_source = NULL;
12195 g_mutex_unlock (&skeleton->priv->lock);
12200 _foo_igen_bat_schedule_emit_changed (FooiGenBatSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
12202 ChangedProperty *cp;
12205 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
12207 ChangedProperty *i_cp = l->data;
12208 if (i_cp->info == info)
12216 cp = g_new0 (ChangedProperty, 1);
12217 cp->prop_id = prop_id;
12219 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
12220 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
12221 g_value_copy (orig_value, &cp->orig_value);
12226 foo_igen_bat_skeleton_notify (GObject *object,
12229 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12230 g_mutex_lock (&skeleton->priv->lock);
12231 if (skeleton->priv->changed_properties != NULL &&
12232 skeleton->priv->changed_properties_idle_source == NULL)
12234 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
12235 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
12236 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_bat_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
12237 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
12238 g_source_unref (skeleton->priv->changed_properties_idle_source);
12240 g_mutex_unlock (&skeleton->priv->lock);
12244 foo_igen_bat_skeleton_set_property (GObject *object,
12246 const GValue *value,
12249 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12250 g_assert (prop_id != 0 && prop_id - 1 < 4);
12251 g_mutex_lock (&skeleton->priv->lock);
12252 g_object_freeze_notify (object);
12253 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
12255 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
12256 _foo_igen_bat_schedule_emit_changed (skeleton, _foo_igen_bat_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
12257 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
12258 g_object_notify_by_pspec (object, pspec);
12260 g_mutex_unlock (&skeleton->priv->lock);
12261 g_object_thaw_notify (object);
12265 foo_igen_bat_skeleton_init (FooiGenBatSkeleton *skeleton)
12267 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_BAT_SKELETON, FooiGenBatSkeletonPrivate);
12268 g_mutex_init (&skeleton->priv->lock);
12269 skeleton->priv->context = g_main_context_ref_thread_default ();
12270 skeleton->priv->properties = g_new0 (GValue, 4);
12271 g_value_init (&skeleton->priv->properties[0], G_TYPE_VARIANT);
12272 g_value_init (&skeleton->priv->properties[1], G_TYPE_VARIANT);
12273 g_value_init (&skeleton->priv->properties[2], G_TYPE_VARIANT);
12274 g_value_init (&skeleton->priv->properties[3], G_TYPE_VARIANT);
12278 foo_igen_bat_skeleton_get_force_i (FooiGenBat *object)
12280 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12282 g_mutex_lock (&skeleton->priv->lock);
12283 value = g_value_get_variant (&(skeleton->priv->properties[0]));
12284 g_mutex_unlock (&skeleton->priv->lock);
12289 foo_igen_bat_skeleton_get_force_s (FooiGenBat *object)
12291 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12293 g_mutex_lock (&skeleton->priv->lock);
12294 value = g_value_get_variant (&(skeleton->priv->properties[1]));
12295 g_mutex_unlock (&skeleton->priv->lock);
12300 foo_igen_bat_skeleton_get_force_ay (FooiGenBat *object)
12302 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12304 g_mutex_lock (&skeleton->priv->lock);
12305 value = g_value_get_variant (&(skeleton->priv->properties[2]));
12306 g_mutex_unlock (&skeleton->priv->lock);
12311 foo_igen_bat_skeleton_get_force_struct (FooiGenBat *object)
12313 FooiGenBatSkeleton *skeleton = FOO_IGEN_BAT_SKELETON (object);
12315 g_mutex_lock (&skeleton->priv->lock);
12316 value = g_value_get_variant (&(skeleton->priv->properties[3]));
12317 g_mutex_unlock (&skeleton->priv->lock);
12322 foo_igen_bat_skeleton_class_init (FooiGenBatSkeletonClass *klass)
12324 GObjectClass *gobject_class;
12325 GDBusInterfaceSkeletonClass *skeleton_class;
12327 g_type_class_add_private (klass, sizeof (FooiGenBatSkeletonPrivate));
12329 gobject_class = G_OBJECT_CLASS (klass);
12330 gobject_class->finalize = foo_igen_bat_skeleton_finalize;
12331 gobject_class->get_property = foo_igen_bat_skeleton_get_property;
12332 gobject_class->set_property = foo_igen_bat_skeleton_set_property;
12333 gobject_class->notify = foo_igen_bat_skeleton_notify;
12336 foo_igen_bat_override_properties (gobject_class, 1);
12338 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
12339 skeleton_class->get_info = foo_igen_bat_skeleton_dbus_interface_get_info;
12340 skeleton_class->get_properties = foo_igen_bat_skeleton_dbus_interface_get_properties;
12341 skeleton_class->flush = foo_igen_bat_skeleton_dbus_interface_flush;
12342 skeleton_class->get_vtable = foo_igen_bat_skeleton_dbus_interface_get_vtable;
12346 foo_igen_bat_skeleton_iface_init (FooiGenBatIface *iface)
12348 iface->force_signal = _foo_igen_bat_on_signal_force_signal;
12349 iface->get_force_i = foo_igen_bat_skeleton_get_force_i;
12350 iface->get_force_s = foo_igen_bat_skeleton_get_force_s;
12351 iface->get_force_ay = foo_igen_bat_skeleton_get_force_ay;
12352 iface->get_force_struct = foo_igen_bat_skeleton_get_force_struct;
12356 * foo_igen_bat_skeleton_new:
12358 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link>.
12360 * Returns: (transfer full) (type FooiGenBatSkeleton): The skeleton object.
12363 foo_igen_bat_skeleton_new (void)
12365 return FOO_IGEN_BAT (g_object_new (FOO_IGEN_TYPE_BAT_SKELETON, NULL));
12368 /* ------------------------------------------------------------------------
12369 * Code for interface org.project.Authorize
12370 * ------------------------------------------------------------------------
12374 * SECTION:FooiGenAuthorize
12375 * @title: FooiGenAuthorize
12376 * @short_description: Generated C code for the org.project.Authorize D-Bus interface
12378 * This section contains code for working with the <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link> D-Bus interface in C.
12381 /* ---- Introspection data for org.project.Authorize ---- */
12383 static const _ExtendedGDBusMethodInfo _foo_igen_authorize_method_info_check_not_authorized =
12387 "CheckNotAuthorized",
12392 "handle-check-not-authorized",
12396 static const _ExtendedGDBusMethodInfo _foo_igen_authorize_method_info_check_authorized =
12405 "handle-check-authorized",
12409 static const _ExtendedGDBusMethodInfo _foo_igen_authorize_method_info_check_not_authorized_from_object =
12413 "CheckNotAuthorizedFromObject",
12418 "handle-check-not-authorized-from-object",
12422 static const _ExtendedGDBusMethodInfo * const _foo_igen_authorize_method_info_pointers[] =
12424 &_foo_igen_authorize_method_info_check_not_authorized,
12425 &_foo_igen_authorize_method_info_check_authorized,
12426 &_foo_igen_authorize_method_info_check_not_authorized_from_object,
12430 static const _ExtendedGDBusInterfaceInfo _foo_igen_authorize_interface_info =
12434 "org.project.Authorize",
12435 (GDBusMethodInfo **) &_foo_igen_authorize_method_info_pointers,
12445 * foo_igen_authorize_interface_info:
12447 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link> D-Bus interface.
12449 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
12451 GDBusInterfaceInfo *
12452 foo_igen_authorize_interface_info (void)
12454 return (GDBusInterfaceInfo *) &_foo_igen_authorize_interface_info;
12458 * foo_igen_authorize_override_properties:
12459 * @klass: The class structure for a #GObject<!-- -->-derived class.
12460 * @property_id_begin: The property id to assign to the first overridden property.
12462 * Overrides all #GObject properties in the #FooiGenAuthorize interface for a concrete class.
12463 * The properties are overridden in the order they are defined.
12465 * Returns: The last property id.
12468 foo_igen_authorize_override_properties (GObjectClass *klass, guint property_id_begin)
12470 return property_id_begin - 1;
12476 * FooiGenAuthorize:
12478 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link>.
12482 * FooiGenAuthorizeIface:
12483 * @parent_iface: The parent interface.
12484 * @handle_check_authorized: Handler for the #FooiGenAuthorize::handle-check-authorized signal.
12485 * @handle_check_not_authorized: Handler for the #FooiGenAuthorize::handle-check-not-authorized signal.
12486 * @handle_check_not_authorized_from_object: Handler for the #FooiGenAuthorize::handle-check-not-authorized-from-object signal.
12488 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link>.
12492 foo_igen_authorize_default_init (FooiGenAuthorizeIface *iface)
12494 /* GObject signals for incoming D-Bus method calls: */
12496 * FooiGenAuthorize::handle-check-not-authorized:
12497 * @object: A #FooiGenAuthorize.
12498 * @invocation: A #GDBusMethodInvocation.
12500 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorized">CheckNotAuthorized()</link> D-Bus method.
12502 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_authorize_complete_check_not_authorized() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
12504 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
12506 g_signal_new ("handle-check-not-authorized",
12507 G_TYPE_FROM_INTERFACE (iface),
12509 G_STRUCT_OFFSET (FooiGenAuthorizeIface, handle_check_not_authorized),
12510 g_signal_accumulator_true_handled,
12512 g_cclosure_marshal_generic,
12515 G_TYPE_DBUS_METHOD_INVOCATION);
12518 * FooiGenAuthorize::handle-check-authorized:
12519 * @object: A #FooiGenAuthorize.
12520 * @invocation: A #GDBusMethodInvocation.
12522 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Authorize.CheckAuthorized">CheckAuthorized()</link> D-Bus method.
12524 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_authorize_complete_check_authorized() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
12526 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
12528 g_signal_new ("handle-check-authorized",
12529 G_TYPE_FROM_INTERFACE (iface),
12531 G_STRUCT_OFFSET (FooiGenAuthorizeIface, handle_check_authorized),
12532 g_signal_accumulator_true_handled,
12534 g_cclosure_marshal_generic,
12537 G_TYPE_DBUS_METHOD_INVOCATION);
12540 * FooiGenAuthorize::handle-check-not-authorized-from-object:
12541 * @object: A #FooiGenAuthorize.
12542 * @invocation: A #GDBusMethodInvocation.
12544 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorizedFromObject">CheckNotAuthorizedFromObject()</link> D-Bus method.
12546 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_authorize_complete_check_not_authorized_from_object() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
12548 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
12550 g_signal_new ("handle-check-not-authorized-from-object",
12551 G_TYPE_FROM_INTERFACE (iface),
12553 G_STRUCT_OFFSET (FooiGenAuthorizeIface, handle_check_not_authorized_from_object),
12554 g_signal_accumulator_true_handled,
12556 g_cclosure_marshal_generic,
12559 G_TYPE_DBUS_METHOD_INVOCATION);
12563 typedef FooiGenAuthorizeIface FooiGenAuthorizeInterface;
12564 G_DEFINE_INTERFACE (FooiGenAuthorize, foo_igen_authorize, G_TYPE_OBJECT);
12567 * foo_igen_authorize_call_check_not_authorized:
12568 * @proxy: A #FooiGenAuthorizeProxy.
12569 * @cancellable: (allow-none): A #GCancellable or %NULL.
12570 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
12571 * @user_data: User data to pass to @callback.
12573 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorized">CheckNotAuthorized()</link> D-Bus method on @proxy.
12574 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
12575 * You can then call foo_igen_authorize_call_check_not_authorized_finish() to get the result of the operation.
12577 * See foo_igen_authorize_call_check_not_authorized_sync() for the synchronous, blocking version of this method.
12580 foo_igen_authorize_call_check_not_authorized (
12581 FooiGenAuthorize *proxy,
12582 GCancellable *cancellable,
12583 GAsyncReadyCallback callback,
12584 gpointer user_data)
12586 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
12587 "CheckNotAuthorized",
12588 g_variant_new ("()"),
12589 G_DBUS_CALL_FLAGS_NONE,
12597 * foo_igen_authorize_call_check_not_authorized_finish:
12598 * @proxy: A #FooiGenAuthorizeProxy.
12599 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_authorize_call_check_not_authorized().
12600 * @error: Return location for error or %NULL.
12602 * Finishes an operation started with foo_igen_authorize_call_check_not_authorized().
12604 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
12607 foo_igen_authorize_call_check_not_authorized_finish (
12608 FooiGenAuthorize *proxy,
12613 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
12616 g_variant_get (_ret,
12618 g_variant_unref (_ret);
12620 return _ret != NULL;
12624 * foo_igen_authorize_call_check_not_authorized_sync:
12625 * @proxy: A #FooiGenAuthorizeProxy.
12626 * @cancellable: (allow-none): A #GCancellable or %NULL.
12627 * @error: Return location for error or %NULL.
12629 * Synchronously invokes the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorized">CheckNotAuthorized()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
12631 * See foo_igen_authorize_call_check_not_authorized() for the asynchronous version of this method.
12633 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
12636 foo_igen_authorize_call_check_not_authorized_sync (
12637 FooiGenAuthorize *proxy,
12638 GCancellable *cancellable,
12642 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
12643 "CheckNotAuthorized",
12644 g_variant_new ("()"),
12645 G_DBUS_CALL_FLAGS_NONE,
12651 g_variant_get (_ret,
12653 g_variant_unref (_ret);
12655 return _ret != NULL;
12659 * foo_igen_authorize_call_check_authorized:
12660 * @proxy: A #FooiGenAuthorizeProxy.
12661 * @cancellable: (allow-none): A #GCancellable or %NULL.
12662 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
12663 * @user_data: User data to pass to @callback.
12665 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Authorize.CheckAuthorized">CheckAuthorized()</link> D-Bus method on @proxy.
12666 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
12667 * You can then call foo_igen_authorize_call_check_authorized_finish() to get the result of the operation.
12669 * See foo_igen_authorize_call_check_authorized_sync() for the synchronous, blocking version of this method.
12672 foo_igen_authorize_call_check_authorized (
12673 FooiGenAuthorize *proxy,
12674 GCancellable *cancellable,
12675 GAsyncReadyCallback callback,
12676 gpointer user_data)
12678 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
12680 g_variant_new ("()"),
12681 G_DBUS_CALL_FLAGS_NONE,
12689 * foo_igen_authorize_call_check_authorized_finish:
12690 * @proxy: A #FooiGenAuthorizeProxy.
12691 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_authorize_call_check_authorized().
12692 * @error: Return location for error or %NULL.
12694 * Finishes an operation started with foo_igen_authorize_call_check_authorized().
12696 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
12699 foo_igen_authorize_call_check_authorized_finish (
12700 FooiGenAuthorize *proxy,
12705 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
12708 g_variant_get (_ret,
12710 g_variant_unref (_ret);
12712 return _ret != NULL;
12716 * foo_igen_authorize_call_check_authorized_sync:
12717 * @proxy: A #FooiGenAuthorizeProxy.
12718 * @cancellable: (allow-none): A #GCancellable or %NULL.
12719 * @error: Return location for error or %NULL.
12721 * Synchronously invokes the <link linkend="gdbus-method-org-project-Authorize.CheckAuthorized">CheckAuthorized()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
12723 * See foo_igen_authorize_call_check_authorized() for the asynchronous version of this method.
12725 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
12728 foo_igen_authorize_call_check_authorized_sync (
12729 FooiGenAuthorize *proxy,
12730 GCancellable *cancellable,
12734 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
12736 g_variant_new ("()"),
12737 G_DBUS_CALL_FLAGS_NONE,
12743 g_variant_get (_ret,
12745 g_variant_unref (_ret);
12747 return _ret != NULL;
12751 * foo_igen_authorize_call_check_not_authorized_from_object:
12752 * @proxy: A #FooiGenAuthorizeProxy.
12753 * @cancellable: (allow-none): A #GCancellable or %NULL.
12754 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
12755 * @user_data: User data to pass to @callback.
12757 * Asynchronously invokes the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorizedFromObject">CheckNotAuthorizedFromObject()</link> D-Bus method on @proxy.
12758 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
12759 * You can then call foo_igen_authorize_call_check_not_authorized_from_object_finish() to get the result of the operation.
12761 * See foo_igen_authorize_call_check_not_authorized_from_object_sync() for the synchronous, blocking version of this method.
12764 foo_igen_authorize_call_check_not_authorized_from_object (
12765 FooiGenAuthorize *proxy,
12766 GCancellable *cancellable,
12767 GAsyncReadyCallback callback,
12768 gpointer user_data)
12770 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
12771 "CheckNotAuthorizedFromObject",
12772 g_variant_new ("()"),
12773 G_DBUS_CALL_FLAGS_NONE,
12781 * foo_igen_authorize_call_check_not_authorized_from_object_finish:
12782 * @proxy: A #FooiGenAuthorizeProxy.
12783 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_authorize_call_check_not_authorized_from_object().
12784 * @error: Return location for error or %NULL.
12786 * Finishes an operation started with foo_igen_authorize_call_check_not_authorized_from_object().
12788 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
12791 foo_igen_authorize_call_check_not_authorized_from_object_finish (
12792 FooiGenAuthorize *proxy,
12797 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
12800 g_variant_get (_ret,
12802 g_variant_unref (_ret);
12804 return _ret != NULL;
12808 * foo_igen_authorize_call_check_not_authorized_from_object_sync:
12809 * @proxy: A #FooiGenAuthorizeProxy.
12810 * @cancellable: (allow-none): A #GCancellable or %NULL.
12811 * @error: Return location for error or %NULL.
12813 * Synchronously invokes the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorizedFromObject">CheckNotAuthorizedFromObject()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
12815 * See foo_igen_authorize_call_check_not_authorized_from_object() for the asynchronous version of this method.
12817 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
12820 foo_igen_authorize_call_check_not_authorized_from_object_sync (
12821 FooiGenAuthorize *proxy,
12822 GCancellable *cancellable,
12826 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
12827 "CheckNotAuthorizedFromObject",
12828 g_variant_new ("()"),
12829 G_DBUS_CALL_FLAGS_NONE,
12835 g_variant_get (_ret,
12837 g_variant_unref (_ret);
12839 return _ret != NULL;
12843 * foo_igen_authorize_complete_check_not_authorized:
12844 * @object: A #FooiGenAuthorize.
12845 * @invocation: (transfer full): A #GDBusMethodInvocation.
12847 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorized">CheckNotAuthorized()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
12849 * This method will free @invocation, you cannot use it afterwards.
12852 foo_igen_authorize_complete_check_not_authorized (
12853 FooiGenAuthorize *object,
12854 GDBusMethodInvocation *invocation)
12856 g_dbus_method_invocation_return_value (invocation,
12857 g_variant_new ("()"));
12861 * foo_igen_authorize_complete_check_authorized:
12862 * @object: A #FooiGenAuthorize.
12863 * @invocation: (transfer full): A #GDBusMethodInvocation.
12865 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Authorize.CheckAuthorized">CheckAuthorized()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
12867 * This method will free @invocation, you cannot use it afterwards.
12870 foo_igen_authorize_complete_check_authorized (
12871 FooiGenAuthorize *object,
12872 GDBusMethodInvocation *invocation)
12874 g_dbus_method_invocation_return_value (invocation,
12875 g_variant_new ("()"));
12879 * foo_igen_authorize_complete_check_not_authorized_from_object:
12880 * @object: A #FooiGenAuthorize.
12881 * @invocation: (transfer full): A #GDBusMethodInvocation.
12883 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-Authorize.CheckNotAuthorizedFromObject">CheckNotAuthorizedFromObject()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
12885 * This method will free @invocation, you cannot use it afterwards.
12888 foo_igen_authorize_complete_check_not_authorized_from_object (
12889 FooiGenAuthorize *object,
12890 GDBusMethodInvocation *invocation)
12892 g_dbus_method_invocation_return_value (invocation,
12893 g_variant_new ("()"));
12896 /* ------------------------------------------------------------------------ */
12899 * FooiGenAuthorizeProxy:
12901 * The #FooiGenAuthorizeProxy structure contains only private data and should only be accessed using the provided API.
12905 * FooiGenAuthorizeProxyClass:
12906 * @parent_class: The parent class.
12908 * Class structure for #FooiGenAuthorizeProxy.
12911 struct _FooiGenAuthorizeProxyPrivate
12916 static void foo_igen_authorize_proxy_iface_init (FooiGenAuthorizeIface *iface);
12918 G_DEFINE_TYPE_WITH_CODE (FooiGenAuthorizeProxy, foo_igen_authorize_proxy, G_TYPE_DBUS_PROXY,
12919 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_AUTHORIZE, foo_igen_authorize_proxy_iface_init));
12922 foo_igen_authorize_proxy_finalize (GObject *object)
12924 FooiGenAuthorizeProxy *proxy = FOO_IGEN_AUTHORIZE_PROXY (object);
12925 g_datalist_clear (&proxy->priv->qdata);
12926 G_OBJECT_CLASS (foo_igen_authorize_proxy_parent_class)->finalize (object);
12930 foo_igen_authorize_proxy_get_property (GObject *object,
12938 foo_igen_authorize_proxy_set_property (GObject *object,
12940 const GValue *value,
12946 foo_igen_authorize_proxy_g_signal (GDBusProxy *proxy,
12947 const gchar *sender_name,
12948 const gchar *signal_name,
12949 GVariant *parameters)
12951 _ExtendedGDBusSignalInfo *info;
12958 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_authorize_interface_info, signal_name);
12961 num_params = g_variant_n_children (parameters);
12962 paramv = g_new0 (GValue, num_params + 1);
12963 g_value_init (¶mv[0], FOO_IGEN_TYPE_AUTHORIZE);
12964 g_value_set_object (¶mv[0], proxy);
12965 g_variant_iter_init (&iter, parameters);
12967 while ((child = g_variant_iter_next_value (&iter)) != NULL)
12969 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
12970 if (arg_info->use_gvariant)
12972 g_value_init (¶mv[n], G_TYPE_VARIANT);
12973 g_value_set_variant (¶mv[n], child);
12977 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
12978 g_variant_unref (child);
12980 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_AUTHORIZE);
12981 g_signal_emitv (paramv, signal_id, 0, NULL);
12982 for (n = 0; n < num_params + 1; n++)
12983 g_value_unset (¶mv[n]);
12988 foo_igen_authorize_proxy_g_properties_changed (GDBusProxy *_proxy,
12989 GVariant *changed_properties,
12990 const gchar *const *invalidated_properties)
12992 FooiGenAuthorizeProxy *proxy = FOO_IGEN_AUTHORIZE_PROXY (_proxy);
12995 GVariantIter *iter;
12996 _ExtendedGDBusPropertyInfo *info;
12997 g_variant_get (changed_properties, "a{sv}", &iter);
12998 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
13000 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_authorize_interface_info, key);
13001 g_datalist_remove_data (&proxy->priv->qdata, key);
13003 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
13005 g_variant_iter_free (iter);
13006 for (n = 0; invalidated_properties[n] != NULL; n++)
13008 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_authorize_interface_info, invalidated_properties[n]);
13009 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
13011 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
13016 foo_igen_authorize_proxy_init (FooiGenAuthorizeProxy *proxy)
13018 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_AUTHORIZE_PROXY, FooiGenAuthorizeProxyPrivate);
13019 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_authorize_interface_info ());
13023 foo_igen_authorize_proxy_class_init (FooiGenAuthorizeProxyClass *klass)
13025 GObjectClass *gobject_class;
13026 GDBusProxyClass *proxy_class;
13028 g_type_class_add_private (klass, sizeof (FooiGenAuthorizeProxyPrivate));
13030 gobject_class = G_OBJECT_CLASS (klass);
13031 gobject_class->finalize = foo_igen_authorize_proxy_finalize;
13032 gobject_class->get_property = foo_igen_authorize_proxy_get_property;
13033 gobject_class->set_property = foo_igen_authorize_proxy_set_property;
13035 proxy_class = G_DBUS_PROXY_CLASS (klass);
13036 proxy_class->g_signal = foo_igen_authorize_proxy_g_signal;
13037 proxy_class->g_properties_changed = foo_igen_authorize_proxy_g_properties_changed;
13042 foo_igen_authorize_proxy_iface_init (FooiGenAuthorizeIface *iface)
13047 * foo_igen_authorize_proxy_new:
13048 * @connection: A #GDBusConnection.
13049 * @flags: Flags from the #GDBusProxyFlags enumeration.
13050 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
13051 * @object_path: An object path.
13052 * @cancellable: (allow-none): A #GCancellable or %NULL.
13053 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
13054 * @user_data: User data to pass to @callback.
13056 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link>. See g_dbus_proxy_new() for more details.
13058 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
13059 * You can then call foo_igen_authorize_proxy_new_finish() to get the result of the operation.
13061 * See foo_igen_authorize_proxy_new_sync() for the synchronous, blocking version of this constructor.
13064 foo_igen_authorize_proxy_new (
13065 GDBusConnection *connection,
13066 GDBusProxyFlags flags,
13068 const gchar *object_path,
13069 GCancellable *cancellable,
13070 GAsyncReadyCallback callback,
13071 gpointer user_data)
13073 g_async_initable_new_async (FOO_IGEN_TYPE_AUTHORIZE_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.Authorize", NULL);
13077 * foo_igen_authorize_proxy_new_finish:
13078 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_authorize_proxy_new().
13079 * @error: Return location for error or %NULL
13081 * Finishes an operation started with foo_igen_authorize_proxy_new().
13083 * Returns: (transfer full) (type FooiGenAuthorizeProxy): The constructed proxy object or %NULL if @error is set.
13086 foo_igen_authorize_proxy_new_finish (
13091 GObject *source_object;
13092 source_object = g_async_result_get_source_object (res);
13093 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
13094 g_object_unref (source_object);
13096 return FOO_IGEN_AUTHORIZE (ret);
13102 * foo_igen_authorize_proxy_new_sync:
13103 * @connection: A #GDBusConnection.
13104 * @flags: Flags from the #GDBusProxyFlags enumeration.
13105 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
13106 * @object_path: An object path.
13107 * @cancellable: (allow-none): A #GCancellable or %NULL.
13108 * @error: Return location for error or %NULL
13110 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link>. See g_dbus_proxy_new_sync() for more details.
13112 * The calling thread is blocked until a reply is received.
13114 * See foo_igen_authorize_proxy_new() for the asynchronous version of this constructor.
13116 * Returns: (transfer full) (type FooiGenAuthorizeProxy): The constructed proxy object or %NULL if @error is set.
13119 foo_igen_authorize_proxy_new_sync (
13120 GDBusConnection *connection,
13121 GDBusProxyFlags flags,
13123 const gchar *object_path,
13124 GCancellable *cancellable,
13128 ret = g_initable_new (FOO_IGEN_TYPE_AUTHORIZE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.project.Authorize", NULL);
13130 return FOO_IGEN_AUTHORIZE (ret);
13137 * foo_igen_authorize_proxy_new_for_bus:
13138 * @bus_type: A #GBusType.
13139 * @flags: Flags from the #GDBusProxyFlags enumeration.
13140 * @name: A bus name (well-known or unique).
13141 * @object_path: An object path.
13142 * @cancellable: (allow-none): A #GCancellable or %NULL.
13143 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
13144 * @user_data: User data to pass to @callback.
13146 * Like foo_igen_authorize_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
13148 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
13149 * You can then call foo_igen_authorize_proxy_new_for_bus_finish() to get the result of the operation.
13151 * See foo_igen_authorize_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
13154 foo_igen_authorize_proxy_new_for_bus (
13156 GDBusProxyFlags flags,
13158 const gchar *object_path,
13159 GCancellable *cancellable,
13160 GAsyncReadyCallback callback,
13161 gpointer user_data)
13163 g_async_initable_new_async (FOO_IGEN_TYPE_AUTHORIZE_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.Authorize", NULL);
13167 * foo_igen_authorize_proxy_new_for_bus_finish:
13168 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_authorize_proxy_new_for_bus().
13169 * @error: Return location for error or %NULL
13171 * Finishes an operation started with foo_igen_authorize_proxy_new_for_bus().
13173 * Returns: (transfer full) (type FooiGenAuthorizeProxy): The constructed proxy object or %NULL if @error is set.
13176 foo_igen_authorize_proxy_new_for_bus_finish (
13181 GObject *source_object;
13182 source_object = g_async_result_get_source_object (res);
13183 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
13184 g_object_unref (source_object);
13186 return FOO_IGEN_AUTHORIZE (ret);
13192 * foo_igen_authorize_proxy_new_for_bus_sync:
13193 * @bus_type: A #GBusType.
13194 * @flags: Flags from the #GDBusProxyFlags enumeration.
13195 * @name: A bus name (well-known or unique).
13196 * @object_path: An object path.
13197 * @cancellable: (allow-none): A #GCancellable or %NULL.
13198 * @error: Return location for error or %NULL
13200 * Like foo_igen_authorize_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
13202 * The calling thread is blocked until a reply is received.
13204 * See foo_igen_authorize_proxy_new_for_bus() for the asynchronous version of this constructor.
13206 * Returns: (transfer full) (type FooiGenAuthorizeProxy): The constructed proxy object or %NULL if @error is set.
13209 foo_igen_authorize_proxy_new_for_bus_sync (
13211 GDBusProxyFlags flags,
13213 const gchar *object_path,
13214 GCancellable *cancellable,
13218 ret = g_initable_new (FOO_IGEN_TYPE_AUTHORIZE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.project.Authorize", NULL);
13220 return FOO_IGEN_AUTHORIZE (ret);
13226 /* ------------------------------------------------------------------------ */
13229 * FooiGenAuthorizeSkeleton:
13231 * The #FooiGenAuthorizeSkeleton structure contains only private data and should only be accessed using the provided API.
13235 * FooiGenAuthorizeSkeletonClass:
13236 * @parent_class: The parent class.
13238 * Class structure for #FooiGenAuthorizeSkeleton.
13241 struct _FooiGenAuthorizeSkeletonPrivate
13243 GValue *properties;
13244 GList *changed_properties;
13245 GSource *changed_properties_idle_source;
13246 GMainContext *context;
13251 _foo_igen_authorize_skeleton_handle_method_call (
13252 GDBusConnection *connection,
13253 const gchar *sender,
13254 const gchar *object_path,
13255 const gchar *interface_name,
13256 const gchar *method_name,
13257 GVariant *parameters,
13258 GDBusMethodInvocation *invocation,
13259 gpointer user_data)
13261 FooiGenAuthorizeSkeleton *skeleton = FOO_IGEN_AUTHORIZE_SKELETON (user_data);
13262 _ExtendedGDBusMethodInfo *info;
13270 GValue return_value = G_VALUE_INIT;
13271 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
13272 g_assert (info != NULL);
13273 num_params = g_variant_n_children (parameters);
13274 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
13276 g_value_init (¶mv[n], FOO_IGEN_TYPE_AUTHORIZE);
13277 g_value_set_object (¶mv[n++], skeleton);
13278 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
13279 g_value_set_object (¶mv[n++], invocation);
13280 if (info->pass_fdlist)
13283 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
13284 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
13286 g_assert_not_reached ();
13289 g_variant_iter_init (&iter, parameters);
13290 while ((child = g_variant_iter_next_value (&iter)) != NULL)
13292 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
13293 if (arg_info->use_gvariant)
13295 g_value_init (¶mv[n], G_TYPE_VARIANT);
13296 g_value_set_variant (¶mv[n], child);
13300 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
13301 g_variant_unref (child);
13303 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_AUTHORIZE);
13304 g_value_init (&return_value, G_TYPE_BOOLEAN);
13305 g_signal_emitv (paramv, signal_id, 0, &return_value);
13306 if (!g_value_get_boolean (&return_value))
13307 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
13308 g_value_unset (&return_value);
13309 for (n = 0; n < num_params + num_extra; n++)
13310 g_value_unset (¶mv[n]);
13315 _foo_igen_authorize_skeleton_handle_get_property (
13316 GDBusConnection *connection,
13317 const gchar *sender,
13318 const gchar *object_path,
13319 const gchar *interface_name,
13320 const gchar *property_name,
13322 gpointer user_data)
13324 FooiGenAuthorizeSkeleton *skeleton = FOO_IGEN_AUTHORIZE_SKELETON (user_data);
13325 GValue value = G_VALUE_INIT;
13327 _ExtendedGDBusPropertyInfo *info;
13330 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_authorize_interface_info, property_name);
13331 g_assert (info != NULL);
13332 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
13335 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
13339 g_value_init (&value, pspec->value_type);
13340 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
13341 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
13342 g_value_unset (&value);
13348 _foo_igen_authorize_skeleton_handle_set_property (
13349 GDBusConnection *connection,
13350 const gchar *sender,
13351 const gchar *object_path,
13352 const gchar *interface_name,
13353 const gchar *property_name,
13356 gpointer user_data)
13358 FooiGenAuthorizeSkeleton *skeleton = FOO_IGEN_AUTHORIZE_SKELETON (user_data);
13359 GValue value = G_VALUE_INIT;
13361 _ExtendedGDBusPropertyInfo *info;
13364 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_authorize_interface_info, property_name);
13365 g_assert (info != NULL);
13366 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
13369 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
13373 if (info->use_gvariant)
13374 g_value_set_variant (&value, variant);
13376 g_dbus_gvariant_to_gvalue (variant, &value);
13377 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
13378 g_value_unset (&value);
13384 static const GDBusInterfaceVTable _foo_igen_authorize_skeleton_vtable =
13386 _foo_igen_authorize_skeleton_handle_method_call,
13387 _foo_igen_authorize_skeleton_handle_get_property,
13388 _foo_igen_authorize_skeleton_handle_set_property
13391 static GDBusInterfaceInfo *
13392 foo_igen_authorize_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
13394 return foo_igen_authorize_interface_info ();
13397 static GDBusInterfaceVTable *
13398 foo_igen_authorize_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
13400 return (GDBusInterfaceVTable *) &_foo_igen_authorize_skeleton_vtable;
13404 foo_igen_authorize_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
13406 FooiGenAuthorizeSkeleton *skeleton = FOO_IGEN_AUTHORIZE_SKELETON (_skeleton);
13408 GVariantBuilder builder;
13410 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
13411 if (_foo_igen_authorize_interface_info.parent_struct.properties == NULL)
13413 for (n = 0; _foo_igen_authorize_interface_info.parent_struct.properties[n] != NULL; n++)
13415 GDBusPropertyInfo *info = _foo_igen_authorize_interface_info.parent_struct.properties[n];
13416 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
13419 value = _foo_igen_authorize_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.Authorize", info->name, NULL, skeleton);
13422 g_variant_take_ref (value);
13423 g_variant_builder_add (&builder, "{sv}", info->name, value);
13424 g_variant_unref (value);
13429 return g_variant_builder_end (&builder);
13433 foo_igen_authorize_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
13437 static void foo_igen_authorize_skeleton_iface_init (FooiGenAuthorizeIface *iface);
13438 G_DEFINE_TYPE_WITH_CODE (FooiGenAuthorizeSkeleton, foo_igen_authorize_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
13439 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_AUTHORIZE, foo_igen_authorize_skeleton_iface_init));
13442 foo_igen_authorize_skeleton_finalize (GObject *object)
13444 FooiGenAuthorizeSkeleton *skeleton = FOO_IGEN_AUTHORIZE_SKELETON (object);
13445 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
13446 if (skeleton->priv->changed_properties_idle_source != NULL)
13447 g_source_destroy (skeleton->priv->changed_properties_idle_source);
13448 g_main_context_unref (skeleton->priv->context);
13449 g_mutex_clear (&skeleton->priv->lock);
13450 G_OBJECT_CLASS (foo_igen_authorize_skeleton_parent_class)->finalize (object);
13454 foo_igen_authorize_skeleton_init (FooiGenAuthorizeSkeleton *skeleton)
13456 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_AUTHORIZE_SKELETON, FooiGenAuthorizeSkeletonPrivate);
13457 g_mutex_init (&skeleton->priv->lock);
13458 skeleton->priv->context = g_main_context_ref_thread_default ();
13462 foo_igen_authorize_skeleton_class_init (FooiGenAuthorizeSkeletonClass *klass)
13464 GObjectClass *gobject_class;
13465 GDBusInterfaceSkeletonClass *skeleton_class;
13467 g_type_class_add_private (klass, sizeof (FooiGenAuthorizeSkeletonPrivate));
13469 gobject_class = G_OBJECT_CLASS (klass);
13470 gobject_class->finalize = foo_igen_authorize_skeleton_finalize;
13472 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
13473 skeleton_class->get_info = foo_igen_authorize_skeleton_dbus_interface_get_info;
13474 skeleton_class->get_properties = foo_igen_authorize_skeleton_dbus_interface_get_properties;
13475 skeleton_class->flush = foo_igen_authorize_skeleton_dbus_interface_flush;
13476 skeleton_class->get_vtable = foo_igen_authorize_skeleton_dbus_interface_get_vtable;
13480 foo_igen_authorize_skeleton_iface_init (FooiGenAuthorizeIface *iface)
13485 * foo_igen_authorize_skeleton_new:
13487 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link>.
13489 * Returns: (transfer full) (type FooiGenAuthorizeSkeleton): The skeleton object.
13492 foo_igen_authorize_skeleton_new (void)
13494 return FOO_IGEN_AUTHORIZE (g_object_new (FOO_IGEN_TYPE_AUTHORIZE_SKELETON, NULL));
13497 /* ------------------------------------------------------------------------
13498 * Code for interface org.project.MethodThreads
13499 * ------------------------------------------------------------------------
13503 * SECTION:FooiGenMethodThreads
13504 * @title: FooiGenMethodThreads
13505 * @short_description: Generated C code for the org.project.MethodThreads D-Bus interface
13507 * This section contains code for working with the <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link> D-Bus interface in C.
13510 /* ---- Introspection data for org.project.MethodThreads ---- */
13512 static const _ExtendedGDBusArgInfo _foo_igen_method_threads_method_info_get_self_OUT_ARG_self_pointer =
13523 static const _ExtendedGDBusArgInfo * const _foo_igen_method_threads_method_info_get_self_OUT_ARG_pointers[] =
13525 &_foo_igen_method_threads_method_info_get_self_OUT_ARG_self_pointer,
13529 static const _ExtendedGDBusMethodInfo _foo_igen_method_threads_method_info_get_self =
13535 (GDBusArgInfo **) &_foo_igen_method_threads_method_info_get_self_OUT_ARG_pointers,
13542 static const _ExtendedGDBusMethodInfo * const _foo_igen_method_threads_method_info_pointers[] =
13544 &_foo_igen_method_threads_method_info_get_self,
13548 static const _ExtendedGDBusInterfaceInfo _foo_igen_method_threads_interface_info =
13552 "org.project.MethodThreads",
13553 (GDBusMethodInfo **) &_foo_igen_method_threads_method_info_pointers,
13563 * foo_igen_method_threads_interface_info:
13565 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link> D-Bus interface.
13567 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
13569 GDBusInterfaceInfo *
13570 foo_igen_method_threads_interface_info (void)
13572 return (GDBusInterfaceInfo *) &_foo_igen_method_threads_interface_info;
13576 * foo_igen_method_threads_override_properties:
13577 * @klass: The class structure for a #GObject<!-- -->-derived class.
13578 * @property_id_begin: The property id to assign to the first overridden property.
13580 * Overrides all #GObject properties in the #FooiGenMethodThreads interface for a concrete class.
13581 * The properties are overridden in the order they are defined.
13583 * Returns: The last property id.
13586 foo_igen_method_threads_override_properties (GObjectClass *klass, guint property_id_begin)
13588 return property_id_begin - 1;
13594 * FooiGenMethodThreads:
13596 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link>.
13600 * FooiGenMethodThreadsIface:
13601 * @parent_iface: The parent interface.
13602 * @handle_get_self: Handler for the #FooiGenMethodThreads::handle-get-self signal.
13604 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link>.
13608 foo_igen_method_threads_default_init (FooiGenMethodThreadsIface *iface)
13610 /* GObject signals for incoming D-Bus method calls: */
13612 * FooiGenMethodThreads::handle-get-self:
13613 * @object: A #FooiGenMethodThreads.
13614 * @invocation: A #GDBusMethodInvocation.
13616 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-MethodThreads.GetSelf">GetSelf()</link> D-Bus method.
13618 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_method_threads_complete_get_self() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
13620 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
13622 g_signal_new ("handle-get-self",
13623 G_TYPE_FROM_INTERFACE (iface),
13625 G_STRUCT_OFFSET (FooiGenMethodThreadsIface, handle_get_self),
13626 g_signal_accumulator_true_handled,
13628 g_cclosure_marshal_generic,
13631 G_TYPE_DBUS_METHOD_INVOCATION);
13635 typedef FooiGenMethodThreadsIface FooiGenMethodThreadsInterface;
13636 G_DEFINE_INTERFACE (FooiGenMethodThreads, foo_igen_method_threads, G_TYPE_OBJECT);
13639 * foo_igen_method_threads_call_get_self:
13640 * @proxy: A #FooiGenMethodThreadsProxy.
13641 * @cancellable: (allow-none): A #GCancellable or %NULL.
13642 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
13643 * @user_data: User data to pass to @callback.
13645 * Asynchronously invokes the <link linkend="gdbus-method-org-project-MethodThreads.GetSelf">GetSelf()</link> D-Bus method on @proxy.
13646 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
13647 * You can then call foo_igen_method_threads_call_get_self_finish() to get the result of the operation.
13649 * See foo_igen_method_threads_call_get_self_sync() for the synchronous, blocking version of this method.
13652 foo_igen_method_threads_call_get_self (
13653 FooiGenMethodThreads *proxy,
13654 GCancellable *cancellable,
13655 GAsyncReadyCallback callback,
13656 gpointer user_data)
13658 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
13660 g_variant_new ("()"),
13661 G_DBUS_CALL_FLAGS_NONE,
13669 * foo_igen_method_threads_call_get_self_finish:
13670 * @proxy: A #FooiGenMethodThreadsProxy.
13671 * @out_self_pointer: (out): Return location for return parameter or %NULL to ignore.
13672 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_method_threads_call_get_self().
13673 * @error: Return location for error or %NULL.
13675 * Finishes an operation started with foo_igen_method_threads_call_get_self().
13677 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
13680 foo_igen_method_threads_call_get_self_finish (
13681 FooiGenMethodThreads *proxy,
13682 gchar **out_self_pointer,
13687 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
13690 g_variant_get (_ret,
13693 g_variant_unref (_ret);
13695 return _ret != NULL;
13699 * foo_igen_method_threads_call_get_self_sync:
13700 * @proxy: A #FooiGenMethodThreadsProxy.
13701 * @out_self_pointer: (out): Return location for return parameter or %NULL to ignore.
13702 * @cancellable: (allow-none): A #GCancellable or %NULL.
13703 * @error: Return location for error or %NULL.
13705 * Synchronously invokes the <link linkend="gdbus-method-org-project-MethodThreads.GetSelf">GetSelf()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
13707 * See foo_igen_method_threads_call_get_self() for the asynchronous version of this method.
13709 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
13712 foo_igen_method_threads_call_get_self_sync (
13713 FooiGenMethodThreads *proxy,
13714 gchar **out_self_pointer,
13715 GCancellable *cancellable,
13719 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
13721 g_variant_new ("()"),
13722 G_DBUS_CALL_FLAGS_NONE,
13728 g_variant_get (_ret,
13731 g_variant_unref (_ret);
13733 return _ret != NULL;
13737 * foo_igen_method_threads_complete_get_self:
13738 * @object: A #FooiGenMethodThreads.
13739 * @invocation: (transfer full): A #GDBusMethodInvocation.
13740 * @self_pointer: Parameter to return.
13742 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-MethodThreads.GetSelf">GetSelf()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
13744 * This method will free @invocation, you cannot use it afterwards.
13747 foo_igen_method_threads_complete_get_self (
13748 FooiGenMethodThreads *object,
13749 GDBusMethodInvocation *invocation,
13750 const gchar *self_pointer)
13752 g_dbus_method_invocation_return_value (invocation,
13753 g_variant_new ("(s)",
13757 /* ------------------------------------------------------------------------ */
13760 * FooiGenMethodThreadsProxy:
13762 * The #FooiGenMethodThreadsProxy structure contains only private data and should only be accessed using the provided API.
13766 * FooiGenMethodThreadsProxyClass:
13767 * @parent_class: The parent class.
13769 * Class structure for #FooiGenMethodThreadsProxy.
13772 struct _FooiGenMethodThreadsProxyPrivate
13777 static void foo_igen_method_threads_proxy_iface_init (FooiGenMethodThreadsIface *iface);
13779 G_DEFINE_TYPE_WITH_CODE (FooiGenMethodThreadsProxy, foo_igen_method_threads_proxy, G_TYPE_DBUS_PROXY,
13780 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_METHOD_THREADS, foo_igen_method_threads_proxy_iface_init));
13783 foo_igen_method_threads_proxy_finalize (GObject *object)
13785 FooiGenMethodThreadsProxy *proxy = FOO_IGEN_METHOD_THREADS_PROXY (object);
13786 g_datalist_clear (&proxy->priv->qdata);
13787 G_OBJECT_CLASS (foo_igen_method_threads_proxy_parent_class)->finalize (object);
13791 foo_igen_method_threads_proxy_get_property (GObject *object,
13799 foo_igen_method_threads_proxy_set_property (GObject *object,
13801 const GValue *value,
13807 foo_igen_method_threads_proxy_g_signal (GDBusProxy *proxy,
13808 const gchar *sender_name,
13809 const gchar *signal_name,
13810 GVariant *parameters)
13812 _ExtendedGDBusSignalInfo *info;
13819 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_method_threads_interface_info, signal_name);
13822 num_params = g_variant_n_children (parameters);
13823 paramv = g_new0 (GValue, num_params + 1);
13824 g_value_init (¶mv[0], FOO_IGEN_TYPE_METHOD_THREADS);
13825 g_value_set_object (¶mv[0], proxy);
13826 g_variant_iter_init (&iter, parameters);
13828 while ((child = g_variant_iter_next_value (&iter)) != NULL)
13830 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
13831 if (arg_info->use_gvariant)
13833 g_value_init (¶mv[n], G_TYPE_VARIANT);
13834 g_value_set_variant (¶mv[n], child);
13838 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
13839 g_variant_unref (child);
13841 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_METHOD_THREADS);
13842 g_signal_emitv (paramv, signal_id, 0, NULL);
13843 for (n = 0; n < num_params + 1; n++)
13844 g_value_unset (¶mv[n]);
13849 foo_igen_method_threads_proxy_g_properties_changed (GDBusProxy *_proxy,
13850 GVariant *changed_properties,
13851 const gchar *const *invalidated_properties)
13853 FooiGenMethodThreadsProxy *proxy = FOO_IGEN_METHOD_THREADS_PROXY (_proxy);
13856 GVariantIter *iter;
13857 _ExtendedGDBusPropertyInfo *info;
13858 g_variant_get (changed_properties, "a{sv}", &iter);
13859 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
13861 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_method_threads_interface_info, key);
13862 g_datalist_remove_data (&proxy->priv->qdata, key);
13864 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
13866 g_variant_iter_free (iter);
13867 for (n = 0; invalidated_properties[n] != NULL; n++)
13869 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_method_threads_interface_info, invalidated_properties[n]);
13870 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
13872 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
13877 foo_igen_method_threads_proxy_init (FooiGenMethodThreadsProxy *proxy)
13879 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_METHOD_THREADS_PROXY, FooiGenMethodThreadsProxyPrivate);
13880 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_method_threads_interface_info ());
13884 foo_igen_method_threads_proxy_class_init (FooiGenMethodThreadsProxyClass *klass)
13886 GObjectClass *gobject_class;
13887 GDBusProxyClass *proxy_class;
13889 g_type_class_add_private (klass, sizeof (FooiGenMethodThreadsProxyPrivate));
13891 gobject_class = G_OBJECT_CLASS (klass);
13892 gobject_class->finalize = foo_igen_method_threads_proxy_finalize;
13893 gobject_class->get_property = foo_igen_method_threads_proxy_get_property;
13894 gobject_class->set_property = foo_igen_method_threads_proxy_set_property;
13896 proxy_class = G_DBUS_PROXY_CLASS (klass);
13897 proxy_class->g_signal = foo_igen_method_threads_proxy_g_signal;
13898 proxy_class->g_properties_changed = foo_igen_method_threads_proxy_g_properties_changed;
13903 foo_igen_method_threads_proxy_iface_init (FooiGenMethodThreadsIface *iface)
13908 * foo_igen_method_threads_proxy_new:
13909 * @connection: A #GDBusConnection.
13910 * @flags: Flags from the #GDBusProxyFlags enumeration.
13911 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
13912 * @object_path: An object path.
13913 * @cancellable: (allow-none): A #GCancellable or %NULL.
13914 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
13915 * @user_data: User data to pass to @callback.
13917 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link>. See g_dbus_proxy_new() for more details.
13919 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
13920 * You can then call foo_igen_method_threads_proxy_new_finish() to get the result of the operation.
13922 * See foo_igen_method_threads_proxy_new_sync() for the synchronous, blocking version of this constructor.
13925 foo_igen_method_threads_proxy_new (
13926 GDBusConnection *connection,
13927 GDBusProxyFlags flags,
13929 const gchar *object_path,
13930 GCancellable *cancellable,
13931 GAsyncReadyCallback callback,
13932 gpointer user_data)
13934 g_async_initable_new_async (FOO_IGEN_TYPE_METHOD_THREADS_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.MethodThreads", NULL);
13938 * foo_igen_method_threads_proxy_new_finish:
13939 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_method_threads_proxy_new().
13940 * @error: Return location for error or %NULL
13942 * Finishes an operation started with foo_igen_method_threads_proxy_new().
13944 * Returns: (transfer full) (type FooiGenMethodThreadsProxy): The constructed proxy object or %NULL if @error is set.
13946 FooiGenMethodThreads *
13947 foo_igen_method_threads_proxy_new_finish (
13952 GObject *source_object;
13953 source_object = g_async_result_get_source_object (res);
13954 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
13955 g_object_unref (source_object);
13957 return FOO_IGEN_METHOD_THREADS (ret);
13963 * foo_igen_method_threads_proxy_new_sync:
13964 * @connection: A #GDBusConnection.
13965 * @flags: Flags from the #GDBusProxyFlags enumeration.
13966 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
13967 * @object_path: An object path.
13968 * @cancellable: (allow-none): A #GCancellable or %NULL.
13969 * @error: Return location for error or %NULL
13971 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link>. See g_dbus_proxy_new_sync() for more details.
13973 * The calling thread is blocked until a reply is received.
13975 * See foo_igen_method_threads_proxy_new() for the asynchronous version of this constructor.
13977 * Returns: (transfer full) (type FooiGenMethodThreadsProxy): The constructed proxy object or %NULL if @error is set.
13979 FooiGenMethodThreads *
13980 foo_igen_method_threads_proxy_new_sync (
13981 GDBusConnection *connection,
13982 GDBusProxyFlags flags,
13984 const gchar *object_path,
13985 GCancellable *cancellable,
13989 ret = g_initable_new (FOO_IGEN_TYPE_METHOD_THREADS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.project.MethodThreads", NULL);
13991 return FOO_IGEN_METHOD_THREADS (ret);
13998 * foo_igen_method_threads_proxy_new_for_bus:
13999 * @bus_type: A #GBusType.
14000 * @flags: Flags from the #GDBusProxyFlags enumeration.
14001 * @name: A bus name (well-known or unique).
14002 * @object_path: An object path.
14003 * @cancellable: (allow-none): A #GCancellable or %NULL.
14004 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
14005 * @user_data: User data to pass to @callback.
14007 * Like foo_igen_method_threads_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
14009 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
14010 * You can then call foo_igen_method_threads_proxy_new_for_bus_finish() to get the result of the operation.
14012 * See foo_igen_method_threads_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
14015 foo_igen_method_threads_proxy_new_for_bus (
14017 GDBusProxyFlags flags,
14019 const gchar *object_path,
14020 GCancellable *cancellable,
14021 GAsyncReadyCallback callback,
14022 gpointer user_data)
14024 g_async_initable_new_async (FOO_IGEN_TYPE_METHOD_THREADS_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.MethodThreads", NULL);
14028 * foo_igen_method_threads_proxy_new_for_bus_finish:
14029 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_method_threads_proxy_new_for_bus().
14030 * @error: Return location for error or %NULL
14032 * Finishes an operation started with foo_igen_method_threads_proxy_new_for_bus().
14034 * Returns: (transfer full) (type FooiGenMethodThreadsProxy): The constructed proxy object or %NULL if @error is set.
14036 FooiGenMethodThreads *
14037 foo_igen_method_threads_proxy_new_for_bus_finish (
14042 GObject *source_object;
14043 source_object = g_async_result_get_source_object (res);
14044 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
14045 g_object_unref (source_object);
14047 return FOO_IGEN_METHOD_THREADS (ret);
14053 * foo_igen_method_threads_proxy_new_for_bus_sync:
14054 * @bus_type: A #GBusType.
14055 * @flags: Flags from the #GDBusProxyFlags enumeration.
14056 * @name: A bus name (well-known or unique).
14057 * @object_path: An object path.
14058 * @cancellable: (allow-none): A #GCancellable or %NULL.
14059 * @error: Return location for error or %NULL
14061 * Like foo_igen_method_threads_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
14063 * The calling thread is blocked until a reply is received.
14065 * See foo_igen_method_threads_proxy_new_for_bus() for the asynchronous version of this constructor.
14067 * Returns: (transfer full) (type FooiGenMethodThreadsProxy): The constructed proxy object or %NULL if @error is set.
14069 FooiGenMethodThreads *
14070 foo_igen_method_threads_proxy_new_for_bus_sync (
14072 GDBusProxyFlags flags,
14074 const gchar *object_path,
14075 GCancellable *cancellable,
14079 ret = g_initable_new (FOO_IGEN_TYPE_METHOD_THREADS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.project.MethodThreads", NULL);
14081 return FOO_IGEN_METHOD_THREADS (ret);
14087 /* ------------------------------------------------------------------------ */
14090 * FooiGenMethodThreadsSkeleton:
14092 * The #FooiGenMethodThreadsSkeleton structure contains only private data and should only be accessed using the provided API.
14096 * FooiGenMethodThreadsSkeletonClass:
14097 * @parent_class: The parent class.
14099 * Class structure for #FooiGenMethodThreadsSkeleton.
14102 struct _FooiGenMethodThreadsSkeletonPrivate
14104 GValue *properties;
14105 GList *changed_properties;
14106 GSource *changed_properties_idle_source;
14107 GMainContext *context;
14112 _foo_igen_method_threads_skeleton_handle_method_call (
14113 GDBusConnection *connection,
14114 const gchar *sender,
14115 const gchar *object_path,
14116 const gchar *interface_name,
14117 const gchar *method_name,
14118 GVariant *parameters,
14119 GDBusMethodInvocation *invocation,
14120 gpointer user_data)
14122 FooiGenMethodThreadsSkeleton *skeleton = FOO_IGEN_METHOD_THREADS_SKELETON (user_data);
14123 _ExtendedGDBusMethodInfo *info;
14131 GValue return_value = G_VALUE_INIT;
14132 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
14133 g_assert (info != NULL);
14134 num_params = g_variant_n_children (parameters);
14135 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
14137 g_value_init (¶mv[n], FOO_IGEN_TYPE_METHOD_THREADS);
14138 g_value_set_object (¶mv[n++], skeleton);
14139 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
14140 g_value_set_object (¶mv[n++], invocation);
14141 if (info->pass_fdlist)
14144 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
14145 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
14147 g_assert_not_reached ();
14150 g_variant_iter_init (&iter, parameters);
14151 while ((child = g_variant_iter_next_value (&iter)) != NULL)
14153 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
14154 if (arg_info->use_gvariant)
14156 g_value_init (¶mv[n], G_TYPE_VARIANT);
14157 g_value_set_variant (¶mv[n], child);
14161 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
14162 g_variant_unref (child);
14164 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_METHOD_THREADS);
14165 g_value_init (&return_value, G_TYPE_BOOLEAN);
14166 g_signal_emitv (paramv, signal_id, 0, &return_value);
14167 if (!g_value_get_boolean (&return_value))
14168 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
14169 g_value_unset (&return_value);
14170 for (n = 0; n < num_params + num_extra; n++)
14171 g_value_unset (¶mv[n]);
14176 _foo_igen_method_threads_skeleton_handle_get_property (
14177 GDBusConnection *connection,
14178 const gchar *sender,
14179 const gchar *object_path,
14180 const gchar *interface_name,
14181 const gchar *property_name,
14183 gpointer user_data)
14185 FooiGenMethodThreadsSkeleton *skeleton = FOO_IGEN_METHOD_THREADS_SKELETON (user_data);
14186 GValue value = G_VALUE_INIT;
14188 _ExtendedGDBusPropertyInfo *info;
14191 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_method_threads_interface_info, property_name);
14192 g_assert (info != NULL);
14193 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
14196 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
14200 g_value_init (&value, pspec->value_type);
14201 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
14202 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
14203 g_value_unset (&value);
14209 _foo_igen_method_threads_skeleton_handle_set_property (
14210 GDBusConnection *connection,
14211 const gchar *sender,
14212 const gchar *object_path,
14213 const gchar *interface_name,
14214 const gchar *property_name,
14217 gpointer user_data)
14219 FooiGenMethodThreadsSkeleton *skeleton = FOO_IGEN_METHOD_THREADS_SKELETON (user_data);
14220 GValue value = G_VALUE_INIT;
14222 _ExtendedGDBusPropertyInfo *info;
14225 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_method_threads_interface_info, property_name);
14226 g_assert (info != NULL);
14227 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
14230 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
14234 if (info->use_gvariant)
14235 g_value_set_variant (&value, variant);
14237 g_dbus_gvariant_to_gvalue (variant, &value);
14238 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
14239 g_value_unset (&value);
14245 static const GDBusInterfaceVTable _foo_igen_method_threads_skeleton_vtable =
14247 _foo_igen_method_threads_skeleton_handle_method_call,
14248 _foo_igen_method_threads_skeleton_handle_get_property,
14249 _foo_igen_method_threads_skeleton_handle_set_property
14252 static GDBusInterfaceInfo *
14253 foo_igen_method_threads_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
14255 return foo_igen_method_threads_interface_info ();
14258 static GDBusInterfaceVTable *
14259 foo_igen_method_threads_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
14261 return (GDBusInterfaceVTable *) &_foo_igen_method_threads_skeleton_vtable;
14265 foo_igen_method_threads_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
14267 FooiGenMethodThreadsSkeleton *skeleton = FOO_IGEN_METHOD_THREADS_SKELETON (_skeleton);
14269 GVariantBuilder builder;
14271 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
14272 if (_foo_igen_method_threads_interface_info.parent_struct.properties == NULL)
14274 for (n = 0; _foo_igen_method_threads_interface_info.parent_struct.properties[n] != NULL; n++)
14276 GDBusPropertyInfo *info = _foo_igen_method_threads_interface_info.parent_struct.properties[n];
14277 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
14280 value = _foo_igen_method_threads_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.MethodThreads", info->name, NULL, skeleton);
14283 g_variant_take_ref (value);
14284 g_variant_builder_add (&builder, "{sv}", info->name, value);
14285 g_variant_unref (value);
14290 return g_variant_builder_end (&builder);
14294 foo_igen_method_threads_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
14298 static void foo_igen_method_threads_skeleton_iface_init (FooiGenMethodThreadsIface *iface);
14299 G_DEFINE_TYPE_WITH_CODE (FooiGenMethodThreadsSkeleton, foo_igen_method_threads_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
14300 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_METHOD_THREADS, foo_igen_method_threads_skeleton_iface_init));
14303 foo_igen_method_threads_skeleton_finalize (GObject *object)
14305 FooiGenMethodThreadsSkeleton *skeleton = FOO_IGEN_METHOD_THREADS_SKELETON (object);
14306 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
14307 if (skeleton->priv->changed_properties_idle_source != NULL)
14308 g_source_destroy (skeleton->priv->changed_properties_idle_source);
14309 g_main_context_unref (skeleton->priv->context);
14310 g_mutex_clear (&skeleton->priv->lock);
14311 G_OBJECT_CLASS (foo_igen_method_threads_skeleton_parent_class)->finalize (object);
14315 foo_igen_method_threads_skeleton_init (FooiGenMethodThreadsSkeleton *skeleton)
14317 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_METHOD_THREADS_SKELETON, FooiGenMethodThreadsSkeletonPrivate);
14318 g_mutex_init (&skeleton->priv->lock);
14319 skeleton->priv->context = g_main_context_ref_thread_default ();
14323 foo_igen_method_threads_skeleton_class_init (FooiGenMethodThreadsSkeletonClass *klass)
14325 GObjectClass *gobject_class;
14326 GDBusInterfaceSkeletonClass *skeleton_class;
14328 g_type_class_add_private (klass, sizeof (FooiGenMethodThreadsSkeletonPrivate));
14330 gobject_class = G_OBJECT_CLASS (klass);
14331 gobject_class->finalize = foo_igen_method_threads_skeleton_finalize;
14333 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
14334 skeleton_class->get_info = foo_igen_method_threads_skeleton_dbus_interface_get_info;
14335 skeleton_class->get_properties = foo_igen_method_threads_skeleton_dbus_interface_get_properties;
14336 skeleton_class->flush = foo_igen_method_threads_skeleton_dbus_interface_flush;
14337 skeleton_class->get_vtable = foo_igen_method_threads_skeleton_dbus_interface_get_vtable;
14341 foo_igen_method_threads_skeleton_iface_init (FooiGenMethodThreadsIface *iface)
14346 * foo_igen_method_threads_skeleton_new:
14348 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link>.
14350 * Returns: (transfer full) (type FooiGenMethodThreadsSkeleton): The skeleton object.
14352 FooiGenMethodThreads *
14353 foo_igen_method_threads_skeleton_new (void)
14355 return FOO_IGEN_METHOD_THREADS (g_object_new (FOO_IGEN_TYPE_METHOD_THREADS_SKELETON, NULL));
14358 /* ------------------------------------------------------------------------
14359 * Code for interface org.project.InlineDocs
14360 * ------------------------------------------------------------------------
14364 * SECTION:FooiGenInlineDocs
14365 * @title: FooiGenInlineDocs
14366 * @short_description: Generated C code for the org.project.InlineDocs D-Bus interface
14368 * This section contains code for working with the <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link> D-Bus interface in C.
14371 /* ---- Introspection data for org.project.InlineDocs ---- */
14373 static const _ExtendedGDBusArgInfo _foo_igen_inline_docs_method_info_foo_method_IN_ARG_greeting =
14384 static const _ExtendedGDBusArgInfo * const _foo_igen_inline_docs_method_info_foo_method_IN_ARG_pointers[] =
14386 &_foo_igen_inline_docs_method_info_foo_method_IN_ARG_greeting,
14390 static const _ExtendedGDBusArgInfo _foo_igen_inline_docs_method_info_foo_method_OUT_ARG_response =
14401 static const _ExtendedGDBusArgInfo * const _foo_igen_inline_docs_method_info_foo_method_OUT_ARG_pointers[] =
14403 &_foo_igen_inline_docs_method_info_foo_method_OUT_ARG_response,
14407 static const _ExtendedGDBusMethodInfo _foo_igen_inline_docs_method_info_foo_method =
14412 (GDBusArgInfo **) &_foo_igen_inline_docs_method_info_foo_method_IN_ARG_pointers,
14413 (GDBusArgInfo **) &_foo_igen_inline_docs_method_info_foo_method_OUT_ARG_pointers,
14416 "handle-foo-method",
14420 static const _ExtendedGDBusArgInfo _foo_igen_inline_docs_method_info_method2_IN_ARG_greeting =
14431 static const _ExtendedGDBusArgInfo * const _foo_igen_inline_docs_method_info_method2_IN_ARG_pointers[] =
14433 &_foo_igen_inline_docs_method_info_method2_IN_ARG_greeting,
14437 static const _ExtendedGDBusArgInfo _foo_igen_inline_docs_method_info_method2_OUT_ARG_response =
14448 static const _ExtendedGDBusArgInfo * const _foo_igen_inline_docs_method_info_method2_OUT_ARG_pointers[] =
14450 &_foo_igen_inline_docs_method_info_method2_OUT_ARG_response,
14454 static const _ExtendedGDBusMethodInfo _foo_igen_inline_docs_method_info_method2 =
14459 (GDBusArgInfo **) &_foo_igen_inline_docs_method_info_method2_IN_ARG_pointers,
14460 (GDBusArgInfo **) &_foo_igen_inline_docs_method_info_method2_OUT_ARG_pointers,
14467 static const _ExtendedGDBusMethodInfo * const _foo_igen_inline_docs_method_info_pointers[] =
14469 &_foo_igen_inline_docs_method_info_foo_method,
14470 &_foo_igen_inline_docs_method_info_method2,
14474 static const _ExtendedGDBusArgInfo _foo_igen_inline_docs_signal_info_bar_signal_ARG_blah =
14485 static const _ExtendedGDBusArgInfo _foo_igen_inline_docs_signal_info_bar_signal_ARG_boo =
14496 static const _ExtendedGDBusArgInfo * const _foo_igen_inline_docs_signal_info_bar_signal_ARG_pointers[] =
14498 &_foo_igen_inline_docs_signal_info_bar_signal_ARG_blah,
14499 &_foo_igen_inline_docs_signal_info_bar_signal_ARG_boo,
14503 static const _ExtendedGDBusSignalInfo _foo_igen_inline_docs_signal_info_bar_signal =
14508 (GDBusArgInfo **) &_foo_igen_inline_docs_signal_info_bar_signal_ARG_pointers,
14514 static const _ExtendedGDBusSignalInfo * const _foo_igen_inline_docs_signal_info_pointers[] =
14516 &_foo_igen_inline_docs_signal_info_bar_signal,
14520 static const _ExtendedGDBusPropertyInfo _foo_igen_inline_docs_property_info_baz_property =
14526 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
14533 static const _ExtendedGDBusPropertyInfo _foo_igen_inline_docs_property_info_property2 =
14539 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
14546 static const _ExtendedGDBusPropertyInfo _foo_igen_inline_docs_property_info_property3 =
14552 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
14559 static const _ExtendedGDBusPropertyInfo _foo_igen_inline_docs_property_info_property4 =
14565 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
14572 static const _ExtendedGDBusPropertyInfo _foo_igen_inline_docs_property_info_property5 =
14578 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
14585 static const _ExtendedGDBusPropertyInfo _foo_igen_inline_docs_property_info_fancy_property =
14591 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
14598 static const _ExtendedGDBusPropertyInfo * const _foo_igen_inline_docs_property_info_pointers[] =
14600 &_foo_igen_inline_docs_property_info_baz_property,
14601 &_foo_igen_inline_docs_property_info_property2,
14602 &_foo_igen_inline_docs_property_info_property3,
14603 &_foo_igen_inline_docs_property_info_property4,
14604 &_foo_igen_inline_docs_property_info_property5,
14605 &_foo_igen_inline_docs_property_info_fancy_property,
14609 static const _ExtendedGDBusInterfaceInfo _foo_igen_inline_docs_interface_info =
14613 "org.project.InlineDocs",
14614 (GDBusMethodInfo **) &_foo_igen_inline_docs_method_info_pointers,
14615 (GDBusSignalInfo **) &_foo_igen_inline_docs_signal_info_pointers,
14616 (GDBusPropertyInfo **) &_foo_igen_inline_docs_property_info_pointers,
14624 * foo_igen_inline_docs_interface_info:
14626 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link> D-Bus interface.
14628 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
14630 GDBusInterfaceInfo *
14631 foo_igen_inline_docs_interface_info (void)
14633 return (GDBusInterfaceInfo *) &_foo_igen_inline_docs_interface_info;
14637 * foo_igen_inline_docs_override_properties:
14638 * @klass: The class structure for a #GObject<!-- -->-derived class.
14639 * @property_id_begin: The property id to assign to the first overridden property.
14641 * Overrides all #GObject properties in the #FooiGenInlineDocs interface for a concrete class.
14642 * The properties are overridden in the order they are defined.
14644 * Returns: The last property id.
14647 foo_igen_inline_docs_override_properties (GObjectClass *klass, guint property_id_begin)
14649 g_object_class_override_property (klass, property_id_begin++, "baz-property");
14650 g_object_class_override_property (klass, property_id_begin++, "property2");
14651 g_object_class_override_property (klass, property_id_begin++, "property3");
14652 g_object_class_override_property (klass, property_id_begin++, "property4");
14653 g_object_class_override_property (klass, property_id_begin++, "property5");
14654 g_object_class_override_property (klass, property_id_begin++, "fancy-property");
14655 return property_id_begin - 1;
14661 * FooiGenInlineDocs:
14663 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link>.
14667 * FooiGenInlineDocsIface:
14668 * @parent_iface: The parent interface.
14669 * @handle_foo_method: Handler for the #FooiGenInlineDocs::handle-foo-method signal.
14670 * @handle_method2: Handler for the #FooiGenInlineDocs::handle-method2 signal.
14671 * @get_baz_property: Getter for the #FooiGenInlineDocs:baz-property property.
14672 * @get_fancy_property: Getter for the #FooiGenInlineDocs:fancy-property property.
14673 * @get_property2: Getter for the #FooiGenInlineDocs:property2 property.
14674 * @get_property3: Getter for the #FooiGenInlineDocs:property3 property.
14675 * @get_property4: Getter for the #FooiGenInlineDocs:property4 property.
14676 * @get_property5: Getter for the #FooiGenInlineDocs:property5 property.
14677 * @bar_signal: Handler for the #FooiGenInlineDocs::bar-signal signal.
14679 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link>.
14683 foo_igen_inline_docs_default_init (FooiGenInlineDocsIface *iface)
14685 /* GObject signals for incoming D-Bus method calls: */
14687 * FooiGenInlineDocs::handle-foo-method:
14688 * @object: A #FooiGenInlineDocs.
14689 * @invocation: A #GDBusMethodInvocation.
14690 * @arg_greeting: Argument passed by remote caller.
14692 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-InlineDocs.FooMethod">FooMethod()</link> D-Bus method.
14694 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_inline_docs_complete_foo_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
14696 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
14698 g_signal_new ("handle-foo-method",
14699 G_TYPE_FROM_INTERFACE (iface),
14701 G_STRUCT_OFFSET (FooiGenInlineDocsIface, handle_foo_method),
14702 g_signal_accumulator_true_handled,
14704 g_cclosure_marshal_generic,
14707 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
14710 * FooiGenInlineDocs::handle-method2:
14711 * @object: A #FooiGenInlineDocs.
14712 * @invocation: A #GDBusMethodInvocation.
14713 * @arg_greeting: Argument passed by remote caller.
14715 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-project-InlineDocs.Method2">Method2()</link> D-Bus method.
14717 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_inline_docs_complete_method2() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
14719 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
14721 g_signal_new ("handle-method2",
14722 G_TYPE_FROM_INTERFACE (iface),
14724 G_STRUCT_OFFSET (FooiGenInlineDocsIface, handle_method2),
14725 g_signal_accumulator_true_handled,
14727 g_cclosure_marshal_generic,
14730 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
14732 /* GObject signals for received D-Bus signals: */
14734 * FooiGenInlineDocs::bar-signal:
14735 * @object: A #FooiGenInlineDocs.
14736 * @arg_blah: Argument.
14737 * @arg_boo: Argument.
14739 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-project-InlineDocs.BarSignal">"BarSignal"</link> is received.
14741 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
14743 g_signal_new ("bar-signal",
14744 G_TYPE_FROM_INTERFACE (iface),
14746 G_STRUCT_OFFSET (FooiGenInlineDocsIface, bar_signal),
14749 g_cclosure_marshal_generic,
14751 2, G_TYPE_STRING, G_TYPE_STRING);
14753 /* GObject properties for D-Bus properties: */
14755 * FooiGenInlineDocs:baz-property:
14757 * Represents the D-Bus property <link linkend="gdbus-property-org-project-InlineDocs.BazProperty">"BazProperty"</link>.
14759 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
14761 g_object_interface_install_property (iface,
14762 g_param_spec_string ("baz-property", "BazProperty", "BazProperty", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
14764 * FooiGenInlineDocs:property2:
14766 * Represents the D-Bus property <link linkend="gdbus-property-org-project-InlineDocs.Property2">"Property2"</link>.
14768 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
14770 g_object_interface_install_property (iface,
14771 g_param_spec_string ("property2", "Property2", "Property2", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
14773 * FooiGenInlineDocs:property3:
14775 * Represents the D-Bus property <link linkend="gdbus-property-org-project-InlineDocs.Property3">"Property3"</link>.
14777 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
14779 g_object_interface_install_property (iface,
14780 g_param_spec_string ("property3", "Property3", "Property3", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
14782 * FooiGenInlineDocs:property4:
14784 * Represents the D-Bus property <link linkend="gdbus-property-org-project-InlineDocs.Property4">"Property4"</link>.
14786 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
14788 g_object_interface_install_property (iface,
14789 g_param_spec_string ("property4", "Property4", "Property4", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
14791 * FooiGenInlineDocs:property5:
14793 * Represents the D-Bus property <link linkend="gdbus-property-org-project-InlineDocs.Property5">"Property5"</link>.
14795 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
14797 g_object_interface_install_property (iface,
14798 g_param_spec_string ("property5", "Property5", "Property5", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
14800 * FooiGenInlineDocs:fancy-property:
14802 * Represents the D-Bus property <link linkend="gdbus-property-org-project-InlineDocs.FancyProperty">"FancyProperty"</link>.
14804 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
14806 g_object_interface_install_property (iface,
14807 g_param_spec_string ("fancy-property", "FancyProperty", "FancyProperty", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
14810 typedef FooiGenInlineDocsIface FooiGenInlineDocsInterface;
14811 G_DEFINE_INTERFACE (FooiGenInlineDocs, foo_igen_inline_docs, G_TYPE_OBJECT);
14814 * foo_igen_inline_docs_get_baz_property: (skip)
14815 * @object: A #FooiGenInlineDocs.
14817 * Gets the value of the <link linkend="gdbus-property-org-project-InlineDocs.BazProperty">"BazProperty"</link> D-Bus property.
14819 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14821 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_inline_docs_dup_baz_property() if on another thread.</warning>
14823 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
14826 foo_igen_inline_docs_get_baz_property (FooiGenInlineDocs *object)
14828 return FOO_IGEN_INLINE_DOCS_GET_IFACE (object)->get_baz_property (object);
14832 * foo_igen_inline_docs_dup_baz_property: (skip)
14833 * @object: A #FooiGenInlineDocs.
14835 * Gets a copy of the <link linkend="gdbus-property-org-project-InlineDocs.BazProperty">"BazProperty"</link> D-Bus property.
14837 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14839 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
14842 foo_igen_inline_docs_dup_baz_property (FooiGenInlineDocs *object)
14845 g_object_get (G_OBJECT (object), "baz-property", &value, NULL);
14850 * foo_igen_inline_docs_set_baz_property: (skip)
14851 * @object: A #FooiGenInlineDocs.
14852 * @value: The value to set.
14854 * Sets the <link linkend="gdbus-property-org-project-InlineDocs.BazProperty">"BazProperty"</link> D-Bus property to @value.
14856 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
14859 foo_igen_inline_docs_set_baz_property (FooiGenInlineDocs *object, const gchar *value)
14861 g_object_set (G_OBJECT (object), "baz-property", value, NULL);
14865 * foo_igen_inline_docs_get_property2: (skip)
14866 * @object: A #FooiGenInlineDocs.
14868 * Gets the value of the <link linkend="gdbus-property-org-project-InlineDocs.Property2">"Property2"</link> D-Bus property.
14870 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14872 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_inline_docs_dup_property2() if on another thread.</warning>
14874 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
14877 foo_igen_inline_docs_get_property2 (FooiGenInlineDocs *object)
14879 return FOO_IGEN_INLINE_DOCS_GET_IFACE (object)->get_property2 (object);
14883 * foo_igen_inline_docs_dup_property2: (skip)
14884 * @object: A #FooiGenInlineDocs.
14886 * Gets a copy of the <link linkend="gdbus-property-org-project-InlineDocs.Property2">"Property2"</link> D-Bus property.
14888 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14890 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
14893 foo_igen_inline_docs_dup_property2 (FooiGenInlineDocs *object)
14896 g_object_get (G_OBJECT (object), "property2", &value, NULL);
14901 * foo_igen_inline_docs_set_property2: (skip)
14902 * @object: A #FooiGenInlineDocs.
14903 * @value: The value to set.
14905 * Sets the <link linkend="gdbus-property-org-project-InlineDocs.Property2">"Property2"</link> D-Bus property to @value.
14907 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
14910 foo_igen_inline_docs_set_property2 (FooiGenInlineDocs *object, const gchar *value)
14912 g_object_set (G_OBJECT (object), "property2", value, NULL);
14916 * foo_igen_inline_docs_get_property3: (skip)
14917 * @object: A #FooiGenInlineDocs.
14919 * Gets the value of the <link linkend="gdbus-property-org-project-InlineDocs.Property3">"Property3"</link> D-Bus property.
14921 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14923 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_inline_docs_dup_property3() if on another thread.</warning>
14925 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
14928 foo_igen_inline_docs_get_property3 (FooiGenInlineDocs *object)
14930 return FOO_IGEN_INLINE_DOCS_GET_IFACE (object)->get_property3 (object);
14934 * foo_igen_inline_docs_dup_property3: (skip)
14935 * @object: A #FooiGenInlineDocs.
14937 * Gets a copy of the <link linkend="gdbus-property-org-project-InlineDocs.Property3">"Property3"</link> D-Bus property.
14939 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14941 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
14944 foo_igen_inline_docs_dup_property3 (FooiGenInlineDocs *object)
14947 g_object_get (G_OBJECT (object), "property3", &value, NULL);
14952 * foo_igen_inline_docs_set_property3: (skip)
14953 * @object: A #FooiGenInlineDocs.
14954 * @value: The value to set.
14956 * Sets the <link linkend="gdbus-property-org-project-InlineDocs.Property3">"Property3"</link> D-Bus property to @value.
14958 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
14961 foo_igen_inline_docs_set_property3 (FooiGenInlineDocs *object, const gchar *value)
14963 g_object_set (G_OBJECT (object), "property3", value, NULL);
14967 * foo_igen_inline_docs_get_property4: (skip)
14968 * @object: A #FooiGenInlineDocs.
14970 * Gets the value of the <link linkend="gdbus-property-org-project-InlineDocs.Property4">"Property4"</link> D-Bus property.
14972 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14974 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_inline_docs_dup_property4() if on another thread.</warning>
14976 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
14979 foo_igen_inline_docs_get_property4 (FooiGenInlineDocs *object)
14981 return FOO_IGEN_INLINE_DOCS_GET_IFACE (object)->get_property4 (object);
14985 * foo_igen_inline_docs_dup_property4: (skip)
14986 * @object: A #FooiGenInlineDocs.
14988 * Gets a copy of the <link linkend="gdbus-property-org-project-InlineDocs.Property4">"Property4"</link> D-Bus property.
14990 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
14992 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
14995 foo_igen_inline_docs_dup_property4 (FooiGenInlineDocs *object)
14998 g_object_get (G_OBJECT (object), "property4", &value, NULL);
15003 * foo_igen_inline_docs_set_property4: (skip)
15004 * @object: A #FooiGenInlineDocs.
15005 * @value: The value to set.
15007 * Sets the <link linkend="gdbus-property-org-project-InlineDocs.Property4">"Property4"</link> D-Bus property to @value.
15009 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
15012 foo_igen_inline_docs_set_property4 (FooiGenInlineDocs *object, const gchar *value)
15014 g_object_set (G_OBJECT (object), "property4", value, NULL);
15018 * foo_igen_inline_docs_get_property5: (skip)
15019 * @object: A #FooiGenInlineDocs.
15021 * Gets the value of the <link linkend="gdbus-property-org-project-InlineDocs.Property5">"Property5"</link> D-Bus property.
15023 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
15025 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_inline_docs_dup_property5() if on another thread.</warning>
15027 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
15030 foo_igen_inline_docs_get_property5 (FooiGenInlineDocs *object)
15032 return FOO_IGEN_INLINE_DOCS_GET_IFACE (object)->get_property5 (object);
15036 * foo_igen_inline_docs_dup_property5: (skip)
15037 * @object: A #FooiGenInlineDocs.
15039 * Gets a copy of the <link linkend="gdbus-property-org-project-InlineDocs.Property5">"Property5"</link> D-Bus property.
15041 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
15043 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
15046 foo_igen_inline_docs_dup_property5 (FooiGenInlineDocs *object)
15049 g_object_get (G_OBJECT (object), "property5", &value, NULL);
15054 * foo_igen_inline_docs_set_property5: (skip)
15055 * @object: A #FooiGenInlineDocs.
15056 * @value: The value to set.
15058 * Sets the <link linkend="gdbus-property-org-project-InlineDocs.Property5">"Property5"</link> D-Bus property to @value.
15060 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
15063 foo_igen_inline_docs_set_property5 (FooiGenInlineDocs *object, const gchar *value)
15065 g_object_set (G_OBJECT (object), "property5", value, NULL);
15069 * foo_igen_inline_docs_get_fancy_property: (skip)
15070 * @object: A #FooiGenInlineDocs.
15072 * Gets the value of the <link linkend="gdbus-property-org-project-InlineDocs.FancyProperty">"FancyProperty"</link> D-Bus property.
15074 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
15076 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_inline_docs_dup_fancy_property() if on another thread.</warning>
15078 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
15081 foo_igen_inline_docs_get_fancy_property (FooiGenInlineDocs *object)
15083 return FOO_IGEN_INLINE_DOCS_GET_IFACE (object)->get_fancy_property (object);
15087 * foo_igen_inline_docs_dup_fancy_property: (skip)
15088 * @object: A #FooiGenInlineDocs.
15090 * Gets a copy of the <link linkend="gdbus-property-org-project-InlineDocs.FancyProperty">"FancyProperty"</link> D-Bus property.
15092 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
15094 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
15097 foo_igen_inline_docs_dup_fancy_property (FooiGenInlineDocs *object)
15100 g_object_get (G_OBJECT (object), "fancy-property", &value, NULL);
15105 * foo_igen_inline_docs_set_fancy_property: (skip)
15106 * @object: A #FooiGenInlineDocs.
15107 * @value: The value to set.
15109 * Sets the <link linkend="gdbus-property-org-project-InlineDocs.FancyProperty">"FancyProperty"</link> D-Bus property to @value.
15111 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
15114 foo_igen_inline_docs_set_fancy_property (FooiGenInlineDocs *object, const gchar *value)
15116 g_object_set (G_OBJECT (object), "fancy-property", value, NULL);
15120 * foo_igen_inline_docs_emit_bar_signal:
15121 * @object: A #FooiGenInlineDocs.
15122 * @arg_blah: Argument to pass with the signal.
15123 * @arg_boo: Argument to pass with the signal.
15125 * Emits the <link linkend="gdbus-signal-org-project-InlineDocs.BarSignal">"BarSignal"</link> D-Bus signal.
15128 foo_igen_inline_docs_emit_bar_signal (
15129 FooiGenInlineDocs *object,
15130 const gchar *arg_blah,
15131 const gchar *arg_boo)
15133 g_signal_emit_by_name (object, "bar-signal", arg_blah, arg_boo);
15137 * foo_igen_inline_docs_call_foo_method:
15138 * @proxy: A #FooiGenInlineDocsProxy.
15139 * @arg_greeting: Argument to pass with the method invocation.
15140 * @cancellable: (allow-none): A #GCancellable or %NULL.
15141 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
15142 * @user_data: User data to pass to @callback.
15144 * Asynchronously invokes the <link linkend="gdbus-method-org-project-InlineDocs.FooMethod">FooMethod()</link> D-Bus method on @proxy.
15145 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
15146 * You can then call foo_igen_inline_docs_call_foo_method_finish() to get the result of the operation.
15148 * See foo_igen_inline_docs_call_foo_method_sync() for the synchronous, blocking version of this method.
15151 foo_igen_inline_docs_call_foo_method (
15152 FooiGenInlineDocs *proxy,
15153 const gchar *arg_greeting,
15154 GCancellable *cancellable,
15155 GAsyncReadyCallback callback,
15156 gpointer user_data)
15158 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
15160 g_variant_new ("(s)",
15162 G_DBUS_CALL_FLAGS_NONE,
15170 * foo_igen_inline_docs_call_foo_method_finish:
15171 * @proxy: A #FooiGenInlineDocsProxy.
15172 * @out_response: (out): Return location for return parameter or %NULL to ignore.
15173 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_inline_docs_call_foo_method().
15174 * @error: Return location for error or %NULL.
15176 * Finishes an operation started with foo_igen_inline_docs_call_foo_method().
15178 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
15181 foo_igen_inline_docs_call_foo_method_finish (
15182 FooiGenInlineDocs *proxy,
15183 gchar **out_response,
15188 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
15191 g_variant_get (_ret,
15194 g_variant_unref (_ret);
15196 return _ret != NULL;
15200 * foo_igen_inline_docs_call_foo_method_sync:
15201 * @proxy: A #FooiGenInlineDocsProxy.
15202 * @arg_greeting: Argument to pass with the method invocation.
15203 * @out_response: (out): Return location for return parameter or %NULL to ignore.
15204 * @cancellable: (allow-none): A #GCancellable or %NULL.
15205 * @error: Return location for error or %NULL.
15207 * Synchronously invokes the <link linkend="gdbus-method-org-project-InlineDocs.FooMethod">FooMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
15209 * See foo_igen_inline_docs_call_foo_method() for the asynchronous version of this method.
15211 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
15214 foo_igen_inline_docs_call_foo_method_sync (
15215 FooiGenInlineDocs *proxy,
15216 const gchar *arg_greeting,
15217 gchar **out_response,
15218 GCancellable *cancellable,
15222 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
15224 g_variant_new ("(s)",
15226 G_DBUS_CALL_FLAGS_NONE,
15232 g_variant_get (_ret,
15235 g_variant_unref (_ret);
15237 return _ret != NULL;
15241 * foo_igen_inline_docs_call_method2:
15242 * @proxy: A #FooiGenInlineDocsProxy.
15243 * @arg_greeting: Argument to pass with the method invocation.
15244 * @cancellable: (allow-none): A #GCancellable or %NULL.
15245 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
15246 * @user_data: User data to pass to @callback.
15248 * Asynchronously invokes the <link linkend="gdbus-method-org-project-InlineDocs.Method2">Method2()</link> D-Bus method on @proxy.
15249 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
15250 * You can then call foo_igen_inline_docs_call_method2_finish() to get the result of the operation.
15252 * See foo_igen_inline_docs_call_method2_sync() for the synchronous, blocking version of this method.
15255 foo_igen_inline_docs_call_method2 (
15256 FooiGenInlineDocs *proxy,
15257 const gchar *arg_greeting,
15258 GCancellable *cancellable,
15259 GAsyncReadyCallback callback,
15260 gpointer user_data)
15262 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
15264 g_variant_new ("(s)",
15266 G_DBUS_CALL_FLAGS_NONE,
15274 * foo_igen_inline_docs_call_method2_finish:
15275 * @proxy: A #FooiGenInlineDocsProxy.
15276 * @out_response: (out): Return location for return parameter or %NULL to ignore.
15277 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_inline_docs_call_method2().
15278 * @error: Return location for error or %NULL.
15280 * Finishes an operation started with foo_igen_inline_docs_call_method2().
15282 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
15285 foo_igen_inline_docs_call_method2_finish (
15286 FooiGenInlineDocs *proxy,
15287 gchar **out_response,
15292 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
15295 g_variant_get (_ret,
15298 g_variant_unref (_ret);
15300 return _ret != NULL;
15304 * foo_igen_inline_docs_call_method2_sync:
15305 * @proxy: A #FooiGenInlineDocsProxy.
15306 * @arg_greeting: Argument to pass with the method invocation.
15307 * @out_response: (out): Return location for return parameter or %NULL to ignore.
15308 * @cancellable: (allow-none): A #GCancellable or %NULL.
15309 * @error: Return location for error or %NULL.
15311 * Synchronously invokes the <link linkend="gdbus-method-org-project-InlineDocs.Method2">Method2()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
15313 * See foo_igen_inline_docs_call_method2() for the asynchronous version of this method.
15315 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
15318 foo_igen_inline_docs_call_method2_sync (
15319 FooiGenInlineDocs *proxy,
15320 const gchar *arg_greeting,
15321 gchar **out_response,
15322 GCancellable *cancellable,
15326 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
15328 g_variant_new ("(s)",
15330 G_DBUS_CALL_FLAGS_NONE,
15336 g_variant_get (_ret,
15339 g_variant_unref (_ret);
15341 return _ret != NULL;
15345 * foo_igen_inline_docs_complete_foo_method:
15346 * @object: A #FooiGenInlineDocs.
15347 * @invocation: (transfer full): A #GDBusMethodInvocation.
15348 * @response: Parameter to return.
15350 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-InlineDocs.FooMethod">FooMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
15352 * This method will free @invocation, you cannot use it afterwards.
15355 foo_igen_inline_docs_complete_foo_method (
15356 FooiGenInlineDocs *object,
15357 GDBusMethodInvocation *invocation,
15358 const gchar *response)
15360 g_dbus_method_invocation_return_value (invocation,
15361 g_variant_new ("(s)",
15366 * foo_igen_inline_docs_complete_method2:
15367 * @object: A #FooiGenInlineDocs.
15368 * @invocation: (transfer full): A #GDBusMethodInvocation.
15369 * @response: Parameter to return.
15371 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-project-InlineDocs.Method2">Method2()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
15373 * This method will free @invocation, you cannot use it afterwards.
15376 foo_igen_inline_docs_complete_method2 (
15377 FooiGenInlineDocs *object,
15378 GDBusMethodInvocation *invocation,
15379 const gchar *response)
15381 g_dbus_method_invocation_return_value (invocation,
15382 g_variant_new ("(s)",
15386 /* ------------------------------------------------------------------------ */
15389 * FooiGenInlineDocsProxy:
15391 * The #FooiGenInlineDocsProxy structure contains only private data and should only be accessed using the provided API.
15395 * FooiGenInlineDocsProxyClass:
15396 * @parent_class: The parent class.
15398 * Class structure for #FooiGenInlineDocsProxy.
15401 struct _FooiGenInlineDocsProxyPrivate
15406 static void foo_igen_inline_docs_proxy_iface_init (FooiGenInlineDocsIface *iface);
15408 G_DEFINE_TYPE_WITH_CODE (FooiGenInlineDocsProxy, foo_igen_inline_docs_proxy, G_TYPE_DBUS_PROXY,
15409 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_INLINE_DOCS, foo_igen_inline_docs_proxy_iface_init));
15412 foo_igen_inline_docs_proxy_finalize (GObject *object)
15414 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15415 g_datalist_clear (&proxy->priv->qdata);
15416 G_OBJECT_CLASS (foo_igen_inline_docs_proxy_parent_class)->finalize (object);
15420 foo_igen_inline_docs_proxy_get_property (GObject *object,
15425 const _ExtendedGDBusPropertyInfo *info;
15427 g_assert (prop_id != 0 && prop_id - 1 < 6);
15428 info = _foo_igen_inline_docs_property_info_pointers[prop_id - 1];
15429 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
15430 if (info->use_gvariant)
15432 g_value_set_variant (value, variant);
15436 if (variant != NULL)
15437 g_dbus_gvariant_to_gvalue (variant, value);
15439 if (variant != NULL)
15440 g_variant_unref (variant);
15444 foo_igen_inline_docs_proxy_set_property_cb (GDBusProxy *proxy,
15446 gpointer user_data)
15448 const _ExtendedGDBusPropertyInfo *info = user_data;
15451 if (!g_dbus_proxy_call_finish (proxy, res, &error))
15453 g_warning ("Error setting property `%s' on interface org.project.InlineDocs: %s (%s, %d)",
15454 info->parent_struct.name,
15455 error->message, g_quark_to_string (error->domain), error->code);
15456 g_error_free (error);
15461 foo_igen_inline_docs_proxy_set_property (GObject *object,
15463 const GValue *value,
15466 const _ExtendedGDBusPropertyInfo *info;
15468 g_assert (prop_id != 0 && prop_id - 1 < 6);
15469 info = _foo_igen_inline_docs_property_info_pointers[prop_id - 1];
15470 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
15471 g_dbus_proxy_call (G_DBUS_PROXY (object),
15472 "org.freedesktop.DBus.Properties.Set",
15473 g_variant_new ("(ssv)", "org.project.InlineDocs", info->parent_struct.name, variant),
15474 G_DBUS_CALL_FLAGS_NONE,
15476 NULL, (GAsyncReadyCallback) foo_igen_inline_docs_proxy_set_property_cb, (gpointer) info);
15477 g_variant_unref (variant);
15481 foo_igen_inline_docs_proxy_g_signal (GDBusProxy *proxy,
15482 const gchar *sender_name,
15483 const gchar *signal_name,
15484 GVariant *parameters)
15486 _ExtendedGDBusSignalInfo *info;
15493 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_inline_docs_interface_info, signal_name);
15496 num_params = g_variant_n_children (parameters);
15497 paramv = g_new0 (GValue, num_params + 1);
15498 g_value_init (¶mv[0], FOO_IGEN_TYPE_INLINE_DOCS);
15499 g_value_set_object (¶mv[0], proxy);
15500 g_variant_iter_init (&iter, parameters);
15502 while ((child = g_variant_iter_next_value (&iter)) != NULL)
15504 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
15505 if (arg_info->use_gvariant)
15507 g_value_init (¶mv[n], G_TYPE_VARIANT);
15508 g_value_set_variant (¶mv[n], child);
15512 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
15513 g_variant_unref (child);
15515 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_INLINE_DOCS);
15516 g_signal_emitv (paramv, signal_id, 0, NULL);
15517 for (n = 0; n < num_params + 1; n++)
15518 g_value_unset (¶mv[n]);
15523 foo_igen_inline_docs_proxy_g_properties_changed (GDBusProxy *_proxy,
15524 GVariant *changed_properties,
15525 const gchar *const *invalidated_properties)
15527 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (_proxy);
15530 GVariantIter *iter;
15531 _ExtendedGDBusPropertyInfo *info;
15532 g_variant_get (changed_properties, "a{sv}", &iter);
15533 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
15535 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_inline_docs_interface_info, key);
15536 g_datalist_remove_data (&proxy->priv->qdata, key);
15538 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
15540 g_variant_iter_free (iter);
15541 for (n = 0; invalidated_properties[n] != NULL; n++)
15543 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_inline_docs_interface_info, invalidated_properties[n]);
15544 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
15546 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
15550 static const gchar *
15551 foo_igen_inline_docs_proxy_get_baz_property (FooiGenInlineDocs *object)
15553 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15555 const gchar *value = NULL;
15556 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "BazProperty");
15557 if (variant != NULL)
15559 value = g_variant_get_string (variant, NULL);
15560 g_variant_unref (variant);
15565 static const gchar *
15566 foo_igen_inline_docs_proxy_get_property2 (FooiGenInlineDocs *object)
15568 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15570 const gchar *value = NULL;
15571 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Property2");
15572 if (variant != NULL)
15574 value = g_variant_get_string (variant, NULL);
15575 g_variant_unref (variant);
15580 static const gchar *
15581 foo_igen_inline_docs_proxy_get_property3 (FooiGenInlineDocs *object)
15583 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15585 const gchar *value = NULL;
15586 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Property3");
15587 if (variant != NULL)
15589 value = g_variant_get_string (variant, NULL);
15590 g_variant_unref (variant);
15595 static const gchar *
15596 foo_igen_inline_docs_proxy_get_property4 (FooiGenInlineDocs *object)
15598 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15600 const gchar *value = NULL;
15601 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Property4");
15602 if (variant != NULL)
15604 value = g_variant_get_string (variant, NULL);
15605 g_variant_unref (variant);
15610 static const gchar *
15611 foo_igen_inline_docs_proxy_get_property5 (FooiGenInlineDocs *object)
15613 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15615 const gchar *value = NULL;
15616 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Property5");
15617 if (variant != NULL)
15619 value = g_variant_get_string (variant, NULL);
15620 g_variant_unref (variant);
15625 static const gchar *
15626 foo_igen_inline_docs_proxy_get_fancy_property (FooiGenInlineDocs *object)
15628 FooiGenInlineDocsProxy *proxy = FOO_IGEN_INLINE_DOCS_PROXY (object);
15630 const gchar *value = NULL;
15631 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "FancyProperty");
15632 if (variant != NULL)
15634 value = g_variant_get_string (variant, NULL);
15635 g_variant_unref (variant);
15641 foo_igen_inline_docs_proxy_init (FooiGenInlineDocsProxy *proxy)
15643 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_INLINE_DOCS_PROXY, FooiGenInlineDocsProxyPrivate);
15644 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_inline_docs_interface_info ());
15648 foo_igen_inline_docs_proxy_class_init (FooiGenInlineDocsProxyClass *klass)
15650 GObjectClass *gobject_class;
15651 GDBusProxyClass *proxy_class;
15653 g_type_class_add_private (klass, sizeof (FooiGenInlineDocsProxyPrivate));
15655 gobject_class = G_OBJECT_CLASS (klass);
15656 gobject_class->finalize = foo_igen_inline_docs_proxy_finalize;
15657 gobject_class->get_property = foo_igen_inline_docs_proxy_get_property;
15658 gobject_class->set_property = foo_igen_inline_docs_proxy_set_property;
15660 proxy_class = G_DBUS_PROXY_CLASS (klass);
15661 proxy_class->g_signal = foo_igen_inline_docs_proxy_g_signal;
15662 proxy_class->g_properties_changed = foo_igen_inline_docs_proxy_g_properties_changed;
15665 foo_igen_inline_docs_override_properties (gobject_class, 1);
15669 foo_igen_inline_docs_proxy_iface_init (FooiGenInlineDocsIface *iface)
15671 iface->get_baz_property = foo_igen_inline_docs_proxy_get_baz_property;
15672 iface->get_property2 = foo_igen_inline_docs_proxy_get_property2;
15673 iface->get_property3 = foo_igen_inline_docs_proxy_get_property3;
15674 iface->get_property4 = foo_igen_inline_docs_proxy_get_property4;
15675 iface->get_property5 = foo_igen_inline_docs_proxy_get_property5;
15676 iface->get_fancy_property = foo_igen_inline_docs_proxy_get_fancy_property;
15680 * foo_igen_inline_docs_proxy_new:
15681 * @connection: A #GDBusConnection.
15682 * @flags: Flags from the #GDBusProxyFlags enumeration.
15683 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
15684 * @object_path: An object path.
15685 * @cancellable: (allow-none): A #GCancellable or %NULL.
15686 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
15687 * @user_data: User data to pass to @callback.
15689 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link>. See g_dbus_proxy_new() for more details.
15691 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
15692 * You can then call foo_igen_inline_docs_proxy_new_finish() to get the result of the operation.
15694 * See foo_igen_inline_docs_proxy_new_sync() for the synchronous, blocking version of this constructor.
15697 foo_igen_inline_docs_proxy_new (
15698 GDBusConnection *connection,
15699 GDBusProxyFlags flags,
15701 const gchar *object_path,
15702 GCancellable *cancellable,
15703 GAsyncReadyCallback callback,
15704 gpointer user_data)
15706 g_async_initable_new_async (FOO_IGEN_TYPE_INLINE_DOCS_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.InlineDocs", NULL);
15710 * foo_igen_inline_docs_proxy_new_finish:
15711 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_inline_docs_proxy_new().
15712 * @error: Return location for error or %NULL
15714 * Finishes an operation started with foo_igen_inline_docs_proxy_new().
15716 * Returns: (transfer full) (type FooiGenInlineDocsProxy): The constructed proxy object or %NULL if @error is set.
15718 FooiGenInlineDocs *
15719 foo_igen_inline_docs_proxy_new_finish (
15724 GObject *source_object;
15725 source_object = g_async_result_get_source_object (res);
15726 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
15727 g_object_unref (source_object);
15729 return FOO_IGEN_INLINE_DOCS (ret);
15735 * foo_igen_inline_docs_proxy_new_sync:
15736 * @connection: A #GDBusConnection.
15737 * @flags: Flags from the #GDBusProxyFlags enumeration.
15738 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
15739 * @object_path: An object path.
15740 * @cancellable: (allow-none): A #GCancellable or %NULL.
15741 * @error: Return location for error or %NULL
15743 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link>. See g_dbus_proxy_new_sync() for more details.
15745 * The calling thread is blocked until a reply is received.
15747 * See foo_igen_inline_docs_proxy_new() for the asynchronous version of this constructor.
15749 * Returns: (transfer full) (type FooiGenInlineDocsProxy): The constructed proxy object or %NULL if @error is set.
15751 FooiGenInlineDocs *
15752 foo_igen_inline_docs_proxy_new_sync (
15753 GDBusConnection *connection,
15754 GDBusProxyFlags flags,
15756 const gchar *object_path,
15757 GCancellable *cancellable,
15761 ret = g_initable_new (FOO_IGEN_TYPE_INLINE_DOCS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.project.InlineDocs", NULL);
15763 return FOO_IGEN_INLINE_DOCS (ret);
15770 * foo_igen_inline_docs_proxy_new_for_bus:
15771 * @bus_type: A #GBusType.
15772 * @flags: Flags from the #GDBusProxyFlags enumeration.
15773 * @name: A bus name (well-known or unique).
15774 * @object_path: An object path.
15775 * @cancellable: (allow-none): A #GCancellable or %NULL.
15776 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
15777 * @user_data: User data to pass to @callback.
15779 * Like foo_igen_inline_docs_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
15781 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
15782 * You can then call foo_igen_inline_docs_proxy_new_for_bus_finish() to get the result of the operation.
15784 * See foo_igen_inline_docs_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
15787 foo_igen_inline_docs_proxy_new_for_bus (
15789 GDBusProxyFlags flags,
15791 const gchar *object_path,
15792 GCancellable *cancellable,
15793 GAsyncReadyCallback callback,
15794 gpointer user_data)
15796 g_async_initable_new_async (FOO_IGEN_TYPE_INLINE_DOCS_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.InlineDocs", NULL);
15800 * foo_igen_inline_docs_proxy_new_for_bus_finish:
15801 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_inline_docs_proxy_new_for_bus().
15802 * @error: Return location for error or %NULL
15804 * Finishes an operation started with foo_igen_inline_docs_proxy_new_for_bus().
15806 * Returns: (transfer full) (type FooiGenInlineDocsProxy): The constructed proxy object or %NULL if @error is set.
15808 FooiGenInlineDocs *
15809 foo_igen_inline_docs_proxy_new_for_bus_finish (
15814 GObject *source_object;
15815 source_object = g_async_result_get_source_object (res);
15816 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
15817 g_object_unref (source_object);
15819 return FOO_IGEN_INLINE_DOCS (ret);
15825 * foo_igen_inline_docs_proxy_new_for_bus_sync:
15826 * @bus_type: A #GBusType.
15827 * @flags: Flags from the #GDBusProxyFlags enumeration.
15828 * @name: A bus name (well-known or unique).
15829 * @object_path: An object path.
15830 * @cancellable: (allow-none): A #GCancellable or %NULL.
15831 * @error: Return location for error or %NULL
15833 * Like foo_igen_inline_docs_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
15835 * The calling thread is blocked until a reply is received.
15837 * See foo_igen_inline_docs_proxy_new_for_bus() for the asynchronous version of this constructor.
15839 * Returns: (transfer full) (type FooiGenInlineDocsProxy): The constructed proxy object or %NULL if @error is set.
15841 FooiGenInlineDocs *
15842 foo_igen_inline_docs_proxy_new_for_bus_sync (
15844 GDBusProxyFlags flags,
15846 const gchar *object_path,
15847 GCancellable *cancellable,
15851 ret = g_initable_new (FOO_IGEN_TYPE_INLINE_DOCS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.project.InlineDocs", NULL);
15853 return FOO_IGEN_INLINE_DOCS (ret);
15859 /* ------------------------------------------------------------------------ */
15862 * FooiGenInlineDocsSkeleton:
15864 * The #FooiGenInlineDocsSkeleton structure contains only private data and should only be accessed using the provided API.
15868 * FooiGenInlineDocsSkeletonClass:
15869 * @parent_class: The parent class.
15871 * Class structure for #FooiGenInlineDocsSkeleton.
15874 struct _FooiGenInlineDocsSkeletonPrivate
15876 GValue *properties;
15877 GList *changed_properties;
15878 GSource *changed_properties_idle_source;
15879 GMainContext *context;
15884 _foo_igen_inline_docs_skeleton_handle_method_call (
15885 GDBusConnection *connection,
15886 const gchar *sender,
15887 const gchar *object_path,
15888 const gchar *interface_name,
15889 const gchar *method_name,
15890 GVariant *parameters,
15891 GDBusMethodInvocation *invocation,
15892 gpointer user_data)
15894 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (user_data);
15895 _ExtendedGDBusMethodInfo *info;
15903 GValue return_value = G_VALUE_INIT;
15904 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
15905 g_assert (info != NULL);
15906 num_params = g_variant_n_children (parameters);
15907 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
15909 g_value_init (¶mv[n], FOO_IGEN_TYPE_INLINE_DOCS);
15910 g_value_set_object (¶mv[n++], skeleton);
15911 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
15912 g_value_set_object (¶mv[n++], invocation);
15913 if (info->pass_fdlist)
15916 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
15917 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
15919 g_assert_not_reached ();
15922 g_variant_iter_init (&iter, parameters);
15923 while ((child = g_variant_iter_next_value (&iter)) != NULL)
15925 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
15926 if (arg_info->use_gvariant)
15928 g_value_init (¶mv[n], G_TYPE_VARIANT);
15929 g_value_set_variant (¶mv[n], child);
15933 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
15934 g_variant_unref (child);
15936 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_INLINE_DOCS);
15937 g_value_init (&return_value, G_TYPE_BOOLEAN);
15938 g_signal_emitv (paramv, signal_id, 0, &return_value);
15939 if (!g_value_get_boolean (&return_value))
15940 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
15941 g_value_unset (&return_value);
15942 for (n = 0; n < num_params + num_extra; n++)
15943 g_value_unset (¶mv[n]);
15948 _foo_igen_inline_docs_skeleton_handle_get_property (
15949 GDBusConnection *connection,
15950 const gchar *sender,
15951 const gchar *object_path,
15952 const gchar *interface_name,
15953 const gchar *property_name,
15955 gpointer user_data)
15957 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (user_data);
15958 GValue value = G_VALUE_INIT;
15960 _ExtendedGDBusPropertyInfo *info;
15963 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_inline_docs_interface_info, property_name);
15964 g_assert (info != NULL);
15965 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
15968 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
15972 g_value_init (&value, pspec->value_type);
15973 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
15974 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
15975 g_value_unset (&value);
15981 _foo_igen_inline_docs_skeleton_handle_set_property (
15982 GDBusConnection *connection,
15983 const gchar *sender,
15984 const gchar *object_path,
15985 const gchar *interface_name,
15986 const gchar *property_name,
15989 gpointer user_data)
15991 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (user_data);
15992 GValue value = G_VALUE_INIT;
15994 _ExtendedGDBusPropertyInfo *info;
15997 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_inline_docs_interface_info, property_name);
15998 g_assert (info != NULL);
15999 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
16002 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
16006 if (info->use_gvariant)
16007 g_value_set_variant (&value, variant);
16009 g_dbus_gvariant_to_gvalue (variant, &value);
16010 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
16011 g_value_unset (&value);
16017 static const GDBusInterfaceVTable _foo_igen_inline_docs_skeleton_vtable =
16019 _foo_igen_inline_docs_skeleton_handle_method_call,
16020 _foo_igen_inline_docs_skeleton_handle_get_property,
16021 _foo_igen_inline_docs_skeleton_handle_set_property
16024 static GDBusInterfaceInfo *
16025 foo_igen_inline_docs_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
16027 return foo_igen_inline_docs_interface_info ();
16030 static GDBusInterfaceVTable *
16031 foo_igen_inline_docs_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
16033 return (GDBusInterfaceVTable *) &_foo_igen_inline_docs_skeleton_vtable;
16037 foo_igen_inline_docs_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
16039 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (_skeleton);
16041 GVariantBuilder builder;
16043 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
16044 if (_foo_igen_inline_docs_interface_info.parent_struct.properties == NULL)
16046 for (n = 0; _foo_igen_inline_docs_interface_info.parent_struct.properties[n] != NULL; n++)
16048 GDBusPropertyInfo *info = _foo_igen_inline_docs_interface_info.parent_struct.properties[n];
16049 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
16052 value = _foo_igen_inline_docs_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.InlineDocs", info->name, NULL, skeleton);
16055 g_variant_take_ref (value);
16056 g_variant_builder_add (&builder, "{sv}", info->name, value);
16057 g_variant_unref (value);
16062 return g_variant_builder_end (&builder);
16065 static gboolean _foo_igen_inline_docs_emit_changed (gpointer user_data);
16068 foo_igen_inline_docs_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
16070 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (_skeleton);
16071 gboolean emit_changed = FALSE;
16073 g_mutex_lock (&skeleton->priv->lock);
16074 if (skeleton->priv->changed_properties_idle_source != NULL)
16076 g_source_destroy (skeleton->priv->changed_properties_idle_source);
16077 skeleton->priv->changed_properties_idle_source = NULL;
16078 emit_changed = TRUE;
16080 g_mutex_unlock (&skeleton->priv->lock);
16083 _foo_igen_inline_docs_emit_changed (skeleton);
16087 _foo_igen_inline_docs_on_signal_bar_signal (
16088 FooiGenInlineDocs *object,
16089 const gchar *arg_blah,
16090 const gchar *arg_boo)
16092 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16094 GList *connections, *l;
16095 GVariant *signal_variant;
16096 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
16098 signal_variant = g_variant_ref_sink (g_variant_new ("(ss)",
16101 for (l = connections; l != NULL; l = l->next)
16103 GDBusConnection *connection = l->data;
16104 g_dbus_connection_emit_signal (connection,
16105 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.project.InlineDocs", "BarSignal",
16106 signal_variant, NULL);
16108 g_variant_unref (signal_variant);
16109 g_list_free_full (connections, g_object_unref);
16112 static void foo_igen_inline_docs_skeleton_iface_init (FooiGenInlineDocsIface *iface);
16113 G_DEFINE_TYPE_WITH_CODE (FooiGenInlineDocsSkeleton, foo_igen_inline_docs_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
16114 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_INLINE_DOCS, foo_igen_inline_docs_skeleton_iface_init));
16117 foo_igen_inline_docs_skeleton_finalize (GObject *object)
16119 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16121 for (n = 0; n < 6; n++)
16122 g_value_unset (&skeleton->priv->properties[n]);
16123 g_free (skeleton->priv->properties);
16124 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
16125 if (skeleton->priv->changed_properties_idle_source != NULL)
16126 g_source_destroy (skeleton->priv->changed_properties_idle_source);
16127 g_main_context_unref (skeleton->priv->context);
16128 g_mutex_clear (&skeleton->priv->lock);
16129 G_OBJECT_CLASS (foo_igen_inline_docs_skeleton_parent_class)->finalize (object);
16133 foo_igen_inline_docs_skeleton_get_property (GObject *object,
16138 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16139 g_assert (prop_id != 0 && prop_id - 1 < 6);
16140 g_mutex_lock (&skeleton->priv->lock);
16141 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
16142 g_mutex_unlock (&skeleton->priv->lock);
16146 _foo_igen_inline_docs_emit_changed (gpointer user_data)
16148 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (user_data);
16150 GVariantBuilder builder;
16151 GVariantBuilder invalidated_builder;
16154 g_mutex_lock (&skeleton->priv->lock);
16155 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
16156 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
16157 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
16159 ChangedProperty *cp = l->data;
16161 const GValue *cur_value;
16163 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
16164 if (!_g_value_equal (cur_value, &cp->orig_value))
16166 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
16167 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
16168 g_variant_unref (variant);
16172 if (num_changes > 0)
16174 GList *connections, *l;
16175 GVariant *signal_variant;
16176 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.project.InlineDocs",
16177 &builder, &invalidated_builder));
16178 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
16179 for (l = connections; l != NULL; l = l->next)
16181 GDBusConnection *connection = l->data;
16183 g_dbus_connection_emit_signal (connection,
16184 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
16185 "org.freedesktop.DBus.Properties",
16186 "PropertiesChanged",
16190 g_variant_unref (signal_variant);
16191 g_list_free_full (connections, g_object_unref);
16195 g_variant_builder_clear (&builder);
16196 g_variant_builder_clear (&invalidated_builder);
16198 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
16199 skeleton->priv->changed_properties = NULL;
16200 skeleton->priv->changed_properties_idle_source = NULL;
16201 g_mutex_unlock (&skeleton->priv->lock);
16206 _foo_igen_inline_docs_schedule_emit_changed (FooiGenInlineDocsSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
16208 ChangedProperty *cp;
16211 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
16213 ChangedProperty *i_cp = l->data;
16214 if (i_cp->info == info)
16222 cp = g_new0 (ChangedProperty, 1);
16223 cp->prop_id = prop_id;
16225 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
16226 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
16227 g_value_copy (orig_value, &cp->orig_value);
16232 foo_igen_inline_docs_skeleton_notify (GObject *object,
16235 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16236 g_mutex_lock (&skeleton->priv->lock);
16237 if (skeleton->priv->changed_properties != NULL &&
16238 skeleton->priv->changed_properties_idle_source == NULL)
16240 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
16241 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
16242 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_inline_docs_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
16243 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
16244 g_source_unref (skeleton->priv->changed_properties_idle_source);
16246 g_mutex_unlock (&skeleton->priv->lock);
16250 foo_igen_inline_docs_skeleton_set_property (GObject *object,
16252 const GValue *value,
16255 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16256 g_assert (prop_id != 0 && prop_id - 1 < 6);
16257 g_mutex_lock (&skeleton->priv->lock);
16258 g_object_freeze_notify (object);
16259 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
16261 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
16262 _foo_igen_inline_docs_schedule_emit_changed (skeleton, _foo_igen_inline_docs_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
16263 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
16264 g_object_notify_by_pspec (object, pspec);
16266 g_mutex_unlock (&skeleton->priv->lock);
16267 g_object_thaw_notify (object);
16271 foo_igen_inline_docs_skeleton_init (FooiGenInlineDocsSkeleton *skeleton)
16273 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_INLINE_DOCS_SKELETON, FooiGenInlineDocsSkeletonPrivate);
16274 g_mutex_init (&skeleton->priv->lock);
16275 skeleton->priv->context = g_main_context_ref_thread_default ();
16276 skeleton->priv->properties = g_new0 (GValue, 6);
16277 g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
16278 g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
16279 g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
16280 g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING);
16281 g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING);
16282 g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING);
16285 static const gchar *
16286 foo_igen_inline_docs_skeleton_get_baz_property (FooiGenInlineDocs *object)
16288 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16289 const gchar *value;
16290 g_mutex_lock (&skeleton->priv->lock);
16291 value = g_value_get_string (&(skeleton->priv->properties[0]));
16292 g_mutex_unlock (&skeleton->priv->lock);
16296 static const gchar *
16297 foo_igen_inline_docs_skeleton_get_property2 (FooiGenInlineDocs *object)
16299 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16300 const gchar *value;
16301 g_mutex_lock (&skeleton->priv->lock);
16302 value = g_value_get_string (&(skeleton->priv->properties[1]));
16303 g_mutex_unlock (&skeleton->priv->lock);
16307 static const gchar *
16308 foo_igen_inline_docs_skeleton_get_property3 (FooiGenInlineDocs *object)
16310 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16311 const gchar *value;
16312 g_mutex_lock (&skeleton->priv->lock);
16313 value = g_value_get_string (&(skeleton->priv->properties[2]));
16314 g_mutex_unlock (&skeleton->priv->lock);
16318 static const gchar *
16319 foo_igen_inline_docs_skeleton_get_property4 (FooiGenInlineDocs *object)
16321 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16322 const gchar *value;
16323 g_mutex_lock (&skeleton->priv->lock);
16324 value = g_value_get_string (&(skeleton->priv->properties[3]));
16325 g_mutex_unlock (&skeleton->priv->lock);
16329 static const gchar *
16330 foo_igen_inline_docs_skeleton_get_property5 (FooiGenInlineDocs *object)
16332 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16333 const gchar *value;
16334 g_mutex_lock (&skeleton->priv->lock);
16335 value = g_value_get_string (&(skeleton->priv->properties[4]));
16336 g_mutex_unlock (&skeleton->priv->lock);
16340 static const gchar *
16341 foo_igen_inline_docs_skeleton_get_fancy_property (FooiGenInlineDocs *object)
16343 FooiGenInlineDocsSkeleton *skeleton = FOO_IGEN_INLINE_DOCS_SKELETON (object);
16344 const gchar *value;
16345 g_mutex_lock (&skeleton->priv->lock);
16346 value = g_value_get_string (&(skeleton->priv->properties[5]));
16347 g_mutex_unlock (&skeleton->priv->lock);
16352 foo_igen_inline_docs_skeleton_class_init (FooiGenInlineDocsSkeletonClass *klass)
16354 GObjectClass *gobject_class;
16355 GDBusInterfaceSkeletonClass *skeleton_class;
16357 g_type_class_add_private (klass, sizeof (FooiGenInlineDocsSkeletonPrivate));
16359 gobject_class = G_OBJECT_CLASS (klass);
16360 gobject_class->finalize = foo_igen_inline_docs_skeleton_finalize;
16361 gobject_class->get_property = foo_igen_inline_docs_skeleton_get_property;
16362 gobject_class->set_property = foo_igen_inline_docs_skeleton_set_property;
16363 gobject_class->notify = foo_igen_inline_docs_skeleton_notify;
16366 foo_igen_inline_docs_override_properties (gobject_class, 1);
16368 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
16369 skeleton_class->get_info = foo_igen_inline_docs_skeleton_dbus_interface_get_info;
16370 skeleton_class->get_properties = foo_igen_inline_docs_skeleton_dbus_interface_get_properties;
16371 skeleton_class->flush = foo_igen_inline_docs_skeleton_dbus_interface_flush;
16372 skeleton_class->get_vtable = foo_igen_inline_docs_skeleton_dbus_interface_get_vtable;
16376 foo_igen_inline_docs_skeleton_iface_init (FooiGenInlineDocsIface *iface)
16378 iface->bar_signal = _foo_igen_inline_docs_on_signal_bar_signal;
16379 iface->get_baz_property = foo_igen_inline_docs_skeleton_get_baz_property;
16380 iface->get_property2 = foo_igen_inline_docs_skeleton_get_property2;
16381 iface->get_property3 = foo_igen_inline_docs_skeleton_get_property3;
16382 iface->get_property4 = foo_igen_inline_docs_skeleton_get_property4;
16383 iface->get_property5 = foo_igen_inline_docs_skeleton_get_property5;
16384 iface->get_fancy_property = foo_igen_inline_docs_skeleton_get_fancy_property;
16388 * foo_igen_inline_docs_skeleton_new:
16390 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link>.
16392 * Returns: (transfer full) (type FooiGenInlineDocsSkeleton): The skeleton object.
16394 FooiGenInlineDocs *
16395 foo_igen_inline_docs_skeleton_new (void)
16397 return FOO_IGEN_INLINE_DOCS (g_object_new (FOO_IGEN_TYPE_INLINE_DOCS_SKELETON, NULL));
16400 /* ------------------------------------------------------------------------
16401 * Code for interface ChangingInterfaceV1
16402 * ------------------------------------------------------------------------
16406 * SECTION:FooiGenChangingInterfaceV1
16407 * @title: FooiGenChangingInterfaceV1
16408 * @short_description: Generated C code for the ChangingInterfaceV1 D-Bus interface
16410 * This section contains code for working with the <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link> D-Bus interface in C.
16413 /* ---- Introspection data for ChangingInterfaceV1 ---- */
16415 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v1_method_info_foo_method =
16424 "handle-foo-method",
16428 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v1_method_info_bar_method =
16437 "handle-bar-method",
16441 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v1_method_info_baz_method =
16450 "handle-baz-method",
16454 static const _ExtendedGDBusMethodInfo * const _foo_igen_changing_interface_v1_method_info_pointers[] =
16456 &_foo_igen_changing_interface_v1_method_info_foo_method,
16457 &_foo_igen_changing_interface_v1_method_info_bar_method,
16458 &_foo_igen_changing_interface_v1_method_info_baz_method,
16462 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v1_signal_info_foo_signal =
16473 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v1_signal_info_bar_signal =
16484 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v1_signal_info_baz_signal =
16495 static const _ExtendedGDBusSignalInfo * const _foo_igen_changing_interface_v1_signal_info_pointers[] =
16497 &_foo_igen_changing_interface_v1_signal_info_foo_signal,
16498 &_foo_igen_changing_interface_v1_signal_info_bar_signal,
16499 &_foo_igen_changing_interface_v1_signal_info_baz_signal,
16503 static const _ExtendedGDBusInterfaceInfo _foo_igen_changing_interface_v1_interface_info =
16507 "ChangingInterfaceV1",
16508 (GDBusMethodInfo **) &_foo_igen_changing_interface_v1_method_info_pointers,
16509 (GDBusSignalInfo **) &_foo_igen_changing_interface_v1_signal_info_pointers,
16513 "changing-interface-v1",
16518 * foo_igen_changing_interface_v1_interface_info:
16520 * Gets a machine-readable description of the <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link> D-Bus interface.
16522 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
16524 GDBusInterfaceInfo *
16525 foo_igen_changing_interface_v1_interface_info (void)
16527 return (GDBusInterfaceInfo *) &_foo_igen_changing_interface_v1_interface_info;
16531 * foo_igen_changing_interface_v1_override_properties:
16532 * @klass: The class structure for a #GObject<!-- -->-derived class.
16533 * @property_id_begin: The property id to assign to the first overridden property.
16535 * Overrides all #GObject properties in the #FooiGenChangingInterfaceV1 interface for a concrete class.
16536 * The properties are overridden in the order they are defined.
16538 * Returns: The last property id.
16541 foo_igen_changing_interface_v1_override_properties (GObjectClass *klass, guint property_id_begin)
16543 return property_id_begin - 1;
16549 * FooiGenChangingInterfaceV1:
16551 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link>.
16555 * FooiGenChangingInterfaceV1Iface:
16556 * @parent_iface: The parent interface.
16557 * @handle_bar_method: Handler for the #FooiGenChangingInterfaceV1::handle-bar-method signal.
16558 * @handle_baz_method: Handler for the #FooiGenChangingInterfaceV1::handle-baz-method signal.
16559 * @handle_foo_method: Handler for the #FooiGenChangingInterfaceV1::handle-foo-method signal.
16560 * @bar_signal: Handler for the #FooiGenChangingInterfaceV1::bar-signal signal.
16561 * @baz_signal: Handler for the #FooiGenChangingInterfaceV1::baz-signal signal.
16562 * @foo_signal: Handler for the #FooiGenChangingInterfaceV1::foo-signal signal.
16564 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link>.
16568 foo_igen_changing_interface_v1_default_init (FooiGenChangingInterfaceV1Iface *iface)
16570 /* GObject signals for incoming D-Bus method calls: */
16572 * FooiGenChangingInterfaceV1::handle-foo-method:
16573 * @object: A #FooiGenChangingInterfaceV1.
16574 * @invocation: A #GDBusMethodInvocation.
16576 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV1.FooMethod">FooMethod()</link> D-Bus method.
16578 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v1_complete_foo_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
16580 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
16582 g_signal_new ("handle-foo-method",
16583 G_TYPE_FROM_INTERFACE (iface),
16585 G_STRUCT_OFFSET (FooiGenChangingInterfaceV1Iface, handle_foo_method),
16586 g_signal_accumulator_true_handled,
16588 g_cclosure_marshal_generic,
16591 G_TYPE_DBUS_METHOD_INVOCATION);
16594 * FooiGenChangingInterfaceV1::handle-bar-method:
16595 * @object: A #FooiGenChangingInterfaceV1.
16596 * @invocation: A #GDBusMethodInvocation.
16598 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV1.BarMethod">BarMethod()</link> D-Bus method.
16600 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v1_complete_bar_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
16602 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
16604 g_signal_new ("handle-bar-method",
16605 G_TYPE_FROM_INTERFACE (iface),
16607 G_STRUCT_OFFSET (FooiGenChangingInterfaceV1Iface, handle_bar_method),
16608 g_signal_accumulator_true_handled,
16610 g_cclosure_marshal_generic,
16613 G_TYPE_DBUS_METHOD_INVOCATION);
16616 * FooiGenChangingInterfaceV1::handle-baz-method:
16617 * @object: A #FooiGenChangingInterfaceV1.
16618 * @invocation: A #GDBusMethodInvocation.
16620 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV1.BazMethod">BazMethod()</link> D-Bus method.
16622 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v1_complete_baz_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
16624 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
16626 g_signal_new ("handle-baz-method",
16627 G_TYPE_FROM_INTERFACE (iface),
16629 G_STRUCT_OFFSET (FooiGenChangingInterfaceV1Iface, handle_baz_method),
16630 g_signal_accumulator_true_handled,
16632 g_cclosure_marshal_generic,
16635 G_TYPE_DBUS_METHOD_INVOCATION);
16637 /* GObject signals for received D-Bus signals: */
16639 * FooiGenChangingInterfaceV1::foo-signal:
16640 * @object: A #FooiGenChangingInterfaceV1.
16642 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV1.FooSignal">"FooSignal"</link> is received.
16644 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
16646 g_signal_new ("foo-signal",
16647 G_TYPE_FROM_INTERFACE (iface),
16649 G_STRUCT_OFFSET (FooiGenChangingInterfaceV1Iface, foo_signal),
16652 g_cclosure_marshal_generic,
16657 * FooiGenChangingInterfaceV1::bar-signal:
16658 * @object: A #FooiGenChangingInterfaceV1.
16660 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV1.BarSignal">"BarSignal"</link> is received.
16662 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
16664 g_signal_new ("bar-signal",
16665 G_TYPE_FROM_INTERFACE (iface),
16667 G_STRUCT_OFFSET (FooiGenChangingInterfaceV1Iface, bar_signal),
16670 g_cclosure_marshal_generic,
16675 * FooiGenChangingInterfaceV1::baz-signal:
16676 * @object: A #FooiGenChangingInterfaceV1.
16678 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV1.BazSignal">"BazSignal"</link> is received.
16680 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
16682 g_signal_new ("baz-signal",
16683 G_TYPE_FROM_INTERFACE (iface),
16685 G_STRUCT_OFFSET (FooiGenChangingInterfaceV1Iface, baz_signal),
16688 g_cclosure_marshal_generic,
16694 typedef FooiGenChangingInterfaceV1Iface FooiGenChangingInterfaceV1Interface;
16695 G_DEFINE_INTERFACE (FooiGenChangingInterfaceV1, foo_igen_changing_interface_v1, G_TYPE_OBJECT);
16698 * foo_igen_changing_interface_v1_emit_foo_signal:
16699 * @object: A #FooiGenChangingInterfaceV1.
16701 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV1.FooSignal">"FooSignal"</link> D-Bus signal.
16704 foo_igen_changing_interface_v1_emit_foo_signal (
16705 FooiGenChangingInterfaceV1 *object)
16707 g_signal_emit_by_name (object, "foo-signal");
16711 * foo_igen_changing_interface_v1_emit_bar_signal:
16712 * @object: A #FooiGenChangingInterfaceV1.
16714 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV1.BarSignal">"BarSignal"</link> D-Bus signal.
16717 foo_igen_changing_interface_v1_emit_bar_signal (
16718 FooiGenChangingInterfaceV1 *object)
16720 g_signal_emit_by_name (object, "bar-signal");
16724 * foo_igen_changing_interface_v1_emit_baz_signal:
16725 * @object: A #FooiGenChangingInterfaceV1.
16727 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV1.BazSignal">"BazSignal"</link> D-Bus signal.
16730 foo_igen_changing_interface_v1_emit_baz_signal (
16731 FooiGenChangingInterfaceV1 *object)
16733 g_signal_emit_by_name (object, "baz-signal");
16737 * foo_igen_changing_interface_v1_call_foo_method:
16738 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16739 * @cancellable: (allow-none): A #GCancellable or %NULL.
16740 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
16741 * @user_data: User data to pass to @callback.
16743 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV1.FooMethod">FooMethod()</link> D-Bus method on @proxy.
16744 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
16745 * You can then call foo_igen_changing_interface_v1_call_foo_method_finish() to get the result of the operation.
16747 * See foo_igen_changing_interface_v1_call_foo_method_sync() for the synchronous, blocking version of this method.
16750 foo_igen_changing_interface_v1_call_foo_method (
16751 FooiGenChangingInterfaceV1 *proxy,
16752 GCancellable *cancellable,
16753 GAsyncReadyCallback callback,
16754 gpointer user_data)
16756 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
16758 g_variant_new ("()"),
16759 G_DBUS_CALL_FLAGS_NONE,
16767 * foo_igen_changing_interface_v1_call_foo_method_finish:
16768 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16769 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v1_call_foo_method().
16770 * @error: Return location for error or %NULL.
16772 * Finishes an operation started with foo_igen_changing_interface_v1_call_foo_method().
16774 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
16777 foo_igen_changing_interface_v1_call_foo_method_finish (
16778 FooiGenChangingInterfaceV1 *proxy,
16783 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
16786 g_variant_get (_ret,
16788 g_variant_unref (_ret);
16790 return _ret != NULL;
16794 * foo_igen_changing_interface_v1_call_foo_method_sync:
16795 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16796 * @cancellable: (allow-none): A #GCancellable or %NULL.
16797 * @error: Return location for error or %NULL.
16799 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV1.FooMethod">FooMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
16801 * See foo_igen_changing_interface_v1_call_foo_method() for the asynchronous version of this method.
16803 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
16806 foo_igen_changing_interface_v1_call_foo_method_sync (
16807 FooiGenChangingInterfaceV1 *proxy,
16808 GCancellable *cancellable,
16812 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
16814 g_variant_new ("()"),
16815 G_DBUS_CALL_FLAGS_NONE,
16821 g_variant_get (_ret,
16823 g_variant_unref (_ret);
16825 return _ret != NULL;
16829 * foo_igen_changing_interface_v1_call_bar_method:
16830 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16831 * @cancellable: (allow-none): A #GCancellable or %NULL.
16832 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
16833 * @user_data: User data to pass to @callback.
16835 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV1.BarMethod">BarMethod()</link> D-Bus method on @proxy.
16836 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
16837 * You can then call foo_igen_changing_interface_v1_call_bar_method_finish() to get the result of the operation.
16839 * See foo_igen_changing_interface_v1_call_bar_method_sync() for the synchronous, blocking version of this method.
16842 foo_igen_changing_interface_v1_call_bar_method (
16843 FooiGenChangingInterfaceV1 *proxy,
16844 GCancellable *cancellable,
16845 GAsyncReadyCallback callback,
16846 gpointer user_data)
16848 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
16850 g_variant_new ("()"),
16851 G_DBUS_CALL_FLAGS_NONE,
16859 * foo_igen_changing_interface_v1_call_bar_method_finish:
16860 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16861 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v1_call_bar_method().
16862 * @error: Return location for error or %NULL.
16864 * Finishes an operation started with foo_igen_changing_interface_v1_call_bar_method().
16866 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
16869 foo_igen_changing_interface_v1_call_bar_method_finish (
16870 FooiGenChangingInterfaceV1 *proxy,
16875 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
16878 g_variant_get (_ret,
16880 g_variant_unref (_ret);
16882 return _ret != NULL;
16886 * foo_igen_changing_interface_v1_call_bar_method_sync:
16887 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16888 * @cancellable: (allow-none): A #GCancellable or %NULL.
16889 * @error: Return location for error or %NULL.
16891 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV1.BarMethod">BarMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
16893 * See foo_igen_changing_interface_v1_call_bar_method() for the asynchronous version of this method.
16895 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
16898 foo_igen_changing_interface_v1_call_bar_method_sync (
16899 FooiGenChangingInterfaceV1 *proxy,
16900 GCancellable *cancellable,
16904 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
16906 g_variant_new ("()"),
16907 G_DBUS_CALL_FLAGS_NONE,
16913 g_variant_get (_ret,
16915 g_variant_unref (_ret);
16917 return _ret != NULL;
16921 * foo_igen_changing_interface_v1_call_baz_method:
16922 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16923 * @cancellable: (allow-none): A #GCancellable or %NULL.
16924 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
16925 * @user_data: User data to pass to @callback.
16927 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV1.BazMethod">BazMethod()</link> D-Bus method on @proxy.
16928 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
16929 * You can then call foo_igen_changing_interface_v1_call_baz_method_finish() to get the result of the operation.
16931 * See foo_igen_changing_interface_v1_call_baz_method_sync() for the synchronous, blocking version of this method.
16934 foo_igen_changing_interface_v1_call_baz_method (
16935 FooiGenChangingInterfaceV1 *proxy,
16936 GCancellable *cancellable,
16937 GAsyncReadyCallback callback,
16938 gpointer user_data)
16940 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
16942 g_variant_new ("()"),
16943 G_DBUS_CALL_FLAGS_NONE,
16951 * foo_igen_changing_interface_v1_call_baz_method_finish:
16952 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16953 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v1_call_baz_method().
16954 * @error: Return location for error or %NULL.
16956 * Finishes an operation started with foo_igen_changing_interface_v1_call_baz_method().
16958 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
16961 foo_igen_changing_interface_v1_call_baz_method_finish (
16962 FooiGenChangingInterfaceV1 *proxy,
16967 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
16970 g_variant_get (_ret,
16972 g_variant_unref (_ret);
16974 return _ret != NULL;
16978 * foo_igen_changing_interface_v1_call_baz_method_sync:
16979 * @proxy: A #FooiGenChangingInterfaceV1Proxy.
16980 * @cancellable: (allow-none): A #GCancellable or %NULL.
16981 * @error: Return location for error or %NULL.
16983 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV1.BazMethod">BazMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
16985 * See foo_igen_changing_interface_v1_call_baz_method() for the asynchronous version of this method.
16987 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
16990 foo_igen_changing_interface_v1_call_baz_method_sync (
16991 FooiGenChangingInterfaceV1 *proxy,
16992 GCancellable *cancellable,
16996 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
16998 g_variant_new ("()"),
16999 G_DBUS_CALL_FLAGS_NONE,
17005 g_variant_get (_ret,
17007 g_variant_unref (_ret);
17009 return _ret != NULL;
17013 * foo_igen_changing_interface_v1_complete_foo_method:
17014 * @object: A #FooiGenChangingInterfaceV1.
17015 * @invocation: (transfer full): A #GDBusMethodInvocation.
17017 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV1.FooMethod">FooMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
17019 * This method will free @invocation, you cannot use it afterwards.
17022 foo_igen_changing_interface_v1_complete_foo_method (
17023 FooiGenChangingInterfaceV1 *object,
17024 GDBusMethodInvocation *invocation)
17026 g_dbus_method_invocation_return_value (invocation,
17027 g_variant_new ("()"));
17031 * foo_igen_changing_interface_v1_complete_bar_method:
17032 * @object: A #FooiGenChangingInterfaceV1.
17033 * @invocation: (transfer full): A #GDBusMethodInvocation.
17035 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV1.BarMethod">BarMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
17037 * This method will free @invocation, you cannot use it afterwards.
17040 foo_igen_changing_interface_v1_complete_bar_method (
17041 FooiGenChangingInterfaceV1 *object,
17042 GDBusMethodInvocation *invocation)
17044 g_dbus_method_invocation_return_value (invocation,
17045 g_variant_new ("()"));
17049 * foo_igen_changing_interface_v1_complete_baz_method:
17050 * @object: A #FooiGenChangingInterfaceV1.
17051 * @invocation: (transfer full): A #GDBusMethodInvocation.
17053 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV1.BazMethod">BazMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
17055 * This method will free @invocation, you cannot use it afterwards.
17058 foo_igen_changing_interface_v1_complete_baz_method (
17059 FooiGenChangingInterfaceV1 *object,
17060 GDBusMethodInvocation *invocation)
17062 g_dbus_method_invocation_return_value (invocation,
17063 g_variant_new ("()"));
17066 /* ------------------------------------------------------------------------ */
17069 * FooiGenChangingInterfaceV1Proxy:
17071 * The #FooiGenChangingInterfaceV1Proxy structure contains only private data and should only be accessed using the provided API.
17075 * FooiGenChangingInterfaceV1ProxyClass:
17076 * @parent_class: The parent class.
17078 * Class structure for #FooiGenChangingInterfaceV1Proxy.
17081 struct _FooiGenChangingInterfaceV1ProxyPrivate
17086 static void foo_igen_changing_interface_v1_proxy_iface_init (FooiGenChangingInterfaceV1Iface *iface);
17088 G_DEFINE_TYPE_WITH_CODE (FooiGenChangingInterfaceV1Proxy, foo_igen_changing_interface_v1_proxy, G_TYPE_DBUS_PROXY,
17089 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1, foo_igen_changing_interface_v1_proxy_iface_init));
17092 foo_igen_changing_interface_v1_proxy_finalize (GObject *object)
17094 FooiGenChangingInterfaceV1Proxy *proxy = FOO_IGEN_CHANGING_INTERFACE_V1_PROXY (object);
17095 g_datalist_clear (&proxy->priv->qdata);
17096 G_OBJECT_CLASS (foo_igen_changing_interface_v1_proxy_parent_class)->finalize (object);
17100 foo_igen_changing_interface_v1_proxy_get_property (GObject *object,
17108 foo_igen_changing_interface_v1_proxy_set_property (GObject *object,
17110 const GValue *value,
17116 foo_igen_changing_interface_v1_proxy_g_signal (GDBusProxy *proxy,
17117 const gchar *sender_name,
17118 const gchar *signal_name,
17119 GVariant *parameters)
17121 _ExtendedGDBusSignalInfo *info;
17128 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v1_interface_info, signal_name);
17131 num_params = g_variant_n_children (parameters);
17132 paramv = g_new0 (GValue, num_params + 1);
17133 g_value_init (¶mv[0], FOO_IGEN_TYPE_CHANGING_INTERFACE_V1);
17134 g_value_set_object (¶mv[0], proxy);
17135 g_variant_iter_init (&iter, parameters);
17137 while ((child = g_variant_iter_next_value (&iter)) != NULL)
17139 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
17140 if (arg_info->use_gvariant)
17142 g_value_init (¶mv[n], G_TYPE_VARIANT);
17143 g_value_set_variant (¶mv[n], child);
17147 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
17148 g_variant_unref (child);
17150 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_CHANGING_INTERFACE_V1);
17151 g_signal_emitv (paramv, signal_id, 0, NULL);
17152 for (n = 0; n < num_params + 1; n++)
17153 g_value_unset (¶mv[n]);
17158 foo_igen_changing_interface_v1_proxy_g_properties_changed (GDBusProxy *_proxy,
17159 GVariant *changed_properties,
17160 const gchar *const *invalidated_properties)
17162 FooiGenChangingInterfaceV1Proxy *proxy = FOO_IGEN_CHANGING_INTERFACE_V1_PROXY (_proxy);
17165 GVariantIter *iter;
17166 _ExtendedGDBusPropertyInfo *info;
17167 g_variant_get (changed_properties, "a{sv}", &iter);
17168 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
17170 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v1_interface_info, key);
17171 g_datalist_remove_data (&proxy->priv->qdata, key);
17173 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
17175 g_variant_iter_free (iter);
17176 for (n = 0; invalidated_properties[n] != NULL; n++)
17178 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v1_interface_info, invalidated_properties[n]);
17179 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
17181 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
17186 foo_igen_changing_interface_v1_proxy_init (FooiGenChangingInterfaceV1Proxy *proxy)
17188 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_PROXY, FooiGenChangingInterfaceV1ProxyPrivate);
17189 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_changing_interface_v1_interface_info ());
17193 foo_igen_changing_interface_v1_proxy_class_init (FooiGenChangingInterfaceV1ProxyClass *klass)
17195 GObjectClass *gobject_class;
17196 GDBusProxyClass *proxy_class;
17198 g_type_class_add_private (klass, sizeof (FooiGenChangingInterfaceV1ProxyPrivate));
17200 gobject_class = G_OBJECT_CLASS (klass);
17201 gobject_class->finalize = foo_igen_changing_interface_v1_proxy_finalize;
17202 gobject_class->get_property = foo_igen_changing_interface_v1_proxy_get_property;
17203 gobject_class->set_property = foo_igen_changing_interface_v1_proxy_set_property;
17205 proxy_class = G_DBUS_PROXY_CLASS (klass);
17206 proxy_class->g_signal = foo_igen_changing_interface_v1_proxy_g_signal;
17207 proxy_class->g_properties_changed = foo_igen_changing_interface_v1_proxy_g_properties_changed;
17212 foo_igen_changing_interface_v1_proxy_iface_init (FooiGenChangingInterfaceV1Iface *iface)
17217 * foo_igen_changing_interface_v1_proxy_new:
17218 * @connection: A #GDBusConnection.
17219 * @flags: Flags from the #GDBusProxyFlags enumeration.
17220 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
17221 * @object_path: An object path.
17222 * @cancellable: (allow-none): A #GCancellable or %NULL.
17223 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
17224 * @user_data: User data to pass to @callback.
17226 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link>. See g_dbus_proxy_new() for more details.
17228 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
17229 * You can then call foo_igen_changing_interface_v1_proxy_new_finish() to get the result of the operation.
17231 * See foo_igen_changing_interface_v1_proxy_new_sync() for the synchronous, blocking version of this constructor.
17234 foo_igen_changing_interface_v1_proxy_new (
17235 GDBusConnection *connection,
17236 GDBusProxyFlags flags,
17238 const gchar *object_path,
17239 GCancellable *cancellable,
17240 GAsyncReadyCallback callback,
17241 gpointer user_data)
17243 g_async_initable_new_async (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_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", "ChangingInterfaceV1", NULL);
17247 * foo_igen_changing_interface_v1_proxy_new_finish:
17248 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v1_proxy_new().
17249 * @error: Return location for error or %NULL
17251 * Finishes an operation started with foo_igen_changing_interface_v1_proxy_new().
17253 * Returns: (transfer full) (type FooiGenChangingInterfaceV1Proxy): The constructed proxy object or %NULL if @error is set.
17255 FooiGenChangingInterfaceV1 *
17256 foo_igen_changing_interface_v1_proxy_new_finish (
17261 GObject *source_object;
17262 source_object = g_async_result_get_source_object (res);
17263 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
17264 g_object_unref (source_object);
17266 return FOO_IGEN_CHANGING_INTERFACE_V1 (ret);
17272 * foo_igen_changing_interface_v1_proxy_new_sync:
17273 * @connection: A #GDBusConnection.
17274 * @flags: Flags from the #GDBusProxyFlags enumeration.
17275 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
17276 * @object_path: An object path.
17277 * @cancellable: (allow-none): A #GCancellable or %NULL.
17278 * @error: Return location for error or %NULL
17280 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link>. See g_dbus_proxy_new_sync() for more details.
17282 * The calling thread is blocked until a reply is received.
17284 * See foo_igen_changing_interface_v1_proxy_new() for the asynchronous version of this constructor.
17286 * Returns: (transfer full) (type FooiGenChangingInterfaceV1Proxy): The constructed proxy object or %NULL if @error is set.
17288 FooiGenChangingInterfaceV1 *
17289 foo_igen_changing_interface_v1_proxy_new_sync (
17290 GDBusConnection *connection,
17291 GDBusProxyFlags flags,
17293 const gchar *object_path,
17294 GCancellable *cancellable,
17298 ret = g_initable_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "ChangingInterfaceV1", NULL);
17300 return FOO_IGEN_CHANGING_INTERFACE_V1 (ret);
17307 * foo_igen_changing_interface_v1_proxy_new_for_bus:
17308 * @bus_type: A #GBusType.
17309 * @flags: Flags from the #GDBusProxyFlags enumeration.
17310 * @name: A bus name (well-known or unique).
17311 * @object_path: An object path.
17312 * @cancellable: (allow-none): A #GCancellable or %NULL.
17313 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
17314 * @user_data: User data to pass to @callback.
17316 * Like foo_igen_changing_interface_v1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
17318 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
17319 * You can then call foo_igen_changing_interface_v1_proxy_new_for_bus_finish() to get the result of the operation.
17321 * See foo_igen_changing_interface_v1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
17324 foo_igen_changing_interface_v1_proxy_new_for_bus (
17326 GDBusProxyFlags flags,
17328 const gchar *object_path,
17329 GCancellable *cancellable,
17330 GAsyncReadyCallback callback,
17331 gpointer user_data)
17333 g_async_initable_new_async (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_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", "ChangingInterfaceV1", NULL);
17337 * foo_igen_changing_interface_v1_proxy_new_for_bus_finish:
17338 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v1_proxy_new_for_bus().
17339 * @error: Return location for error or %NULL
17341 * Finishes an operation started with foo_igen_changing_interface_v1_proxy_new_for_bus().
17343 * Returns: (transfer full) (type FooiGenChangingInterfaceV1Proxy): The constructed proxy object or %NULL if @error is set.
17345 FooiGenChangingInterfaceV1 *
17346 foo_igen_changing_interface_v1_proxy_new_for_bus_finish (
17351 GObject *source_object;
17352 source_object = g_async_result_get_source_object (res);
17353 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
17354 g_object_unref (source_object);
17356 return FOO_IGEN_CHANGING_INTERFACE_V1 (ret);
17362 * foo_igen_changing_interface_v1_proxy_new_for_bus_sync:
17363 * @bus_type: A #GBusType.
17364 * @flags: Flags from the #GDBusProxyFlags enumeration.
17365 * @name: A bus name (well-known or unique).
17366 * @object_path: An object path.
17367 * @cancellable: (allow-none): A #GCancellable or %NULL.
17368 * @error: Return location for error or %NULL
17370 * Like foo_igen_changing_interface_v1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
17372 * The calling thread is blocked until a reply is received.
17374 * See foo_igen_changing_interface_v1_proxy_new_for_bus() for the asynchronous version of this constructor.
17376 * Returns: (transfer full) (type FooiGenChangingInterfaceV1Proxy): The constructed proxy object or %NULL if @error is set.
17378 FooiGenChangingInterfaceV1 *
17379 foo_igen_changing_interface_v1_proxy_new_for_bus_sync (
17381 GDBusProxyFlags flags,
17383 const gchar *object_path,
17384 GCancellable *cancellable,
17388 ret = g_initable_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "ChangingInterfaceV1", NULL);
17390 return FOO_IGEN_CHANGING_INTERFACE_V1 (ret);
17396 /* ------------------------------------------------------------------------ */
17399 * FooiGenChangingInterfaceV1Skeleton:
17401 * The #FooiGenChangingInterfaceV1Skeleton structure contains only private data and should only be accessed using the provided API.
17405 * FooiGenChangingInterfaceV1SkeletonClass:
17406 * @parent_class: The parent class.
17408 * Class structure for #FooiGenChangingInterfaceV1Skeleton.
17411 struct _FooiGenChangingInterfaceV1SkeletonPrivate
17413 GValue *properties;
17414 GList *changed_properties;
17415 GSource *changed_properties_idle_source;
17416 GMainContext *context;
17421 _foo_igen_changing_interface_v1_skeleton_handle_method_call (
17422 GDBusConnection *connection,
17423 const gchar *sender,
17424 const gchar *object_path,
17425 const gchar *interface_name,
17426 const gchar *method_name,
17427 GVariant *parameters,
17428 GDBusMethodInvocation *invocation,
17429 gpointer user_data)
17431 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (user_data);
17432 _ExtendedGDBusMethodInfo *info;
17440 GValue return_value = G_VALUE_INIT;
17441 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
17442 g_assert (info != NULL);
17443 num_params = g_variant_n_children (parameters);
17444 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
17446 g_value_init (¶mv[n], FOO_IGEN_TYPE_CHANGING_INTERFACE_V1);
17447 g_value_set_object (¶mv[n++], skeleton);
17448 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
17449 g_value_set_object (¶mv[n++], invocation);
17450 if (info->pass_fdlist)
17453 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
17454 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
17456 g_assert_not_reached ();
17459 g_variant_iter_init (&iter, parameters);
17460 while ((child = g_variant_iter_next_value (&iter)) != NULL)
17462 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
17463 if (arg_info->use_gvariant)
17465 g_value_init (¶mv[n], G_TYPE_VARIANT);
17466 g_value_set_variant (¶mv[n], child);
17470 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
17471 g_variant_unref (child);
17473 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_CHANGING_INTERFACE_V1);
17474 g_value_init (&return_value, G_TYPE_BOOLEAN);
17475 g_signal_emitv (paramv, signal_id, 0, &return_value);
17476 if (!g_value_get_boolean (&return_value))
17477 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
17478 g_value_unset (&return_value);
17479 for (n = 0; n < num_params + num_extra; n++)
17480 g_value_unset (¶mv[n]);
17485 _foo_igen_changing_interface_v1_skeleton_handle_get_property (
17486 GDBusConnection *connection,
17487 const gchar *sender,
17488 const gchar *object_path,
17489 const gchar *interface_name,
17490 const gchar *property_name,
17492 gpointer user_data)
17494 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (user_data);
17495 GValue value = G_VALUE_INIT;
17497 _ExtendedGDBusPropertyInfo *info;
17500 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v1_interface_info, property_name);
17501 g_assert (info != NULL);
17502 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
17505 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
17509 g_value_init (&value, pspec->value_type);
17510 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
17511 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
17512 g_value_unset (&value);
17518 _foo_igen_changing_interface_v1_skeleton_handle_set_property (
17519 GDBusConnection *connection,
17520 const gchar *sender,
17521 const gchar *object_path,
17522 const gchar *interface_name,
17523 const gchar *property_name,
17526 gpointer user_data)
17528 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (user_data);
17529 GValue value = G_VALUE_INIT;
17531 _ExtendedGDBusPropertyInfo *info;
17534 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v1_interface_info, property_name);
17535 g_assert (info != NULL);
17536 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
17539 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
17543 if (info->use_gvariant)
17544 g_value_set_variant (&value, variant);
17546 g_dbus_gvariant_to_gvalue (variant, &value);
17547 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
17548 g_value_unset (&value);
17554 static const GDBusInterfaceVTable _foo_igen_changing_interface_v1_skeleton_vtable =
17556 _foo_igen_changing_interface_v1_skeleton_handle_method_call,
17557 _foo_igen_changing_interface_v1_skeleton_handle_get_property,
17558 _foo_igen_changing_interface_v1_skeleton_handle_set_property
17561 static GDBusInterfaceInfo *
17562 foo_igen_changing_interface_v1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
17564 return foo_igen_changing_interface_v1_interface_info ();
17567 static GDBusInterfaceVTable *
17568 foo_igen_changing_interface_v1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
17570 return (GDBusInterfaceVTable *) &_foo_igen_changing_interface_v1_skeleton_vtable;
17574 foo_igen_changing_interface_v1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
17576 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (_skeleton);
17578 GVariantBuilder builder;
17580 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
17581 if (_foo_igen_changing_interface_v1_interface_info.parent_struct.properties == NULL)
17583 for (n = 0; _foo_igen_changing_interface_v1_interface_info.parent_struct.properties[n] != NULL; n++)
17585 GDBusPropertyInfo *info = _foo_igen_changing_interface_v1_interface_info.parent_struct.properties[n];
17586 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
17589 value = _foo_igen_changing_interface_v1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV1", info->name, NULL, skeleton);
17592 g_variant_take_ref (value);
17593 g_variant_builder_add (&builder, "{sv}", info->name, value);
17594 g_variant_unref (value);
17599 return g_variant_builder_end (&builder);
17603 foo_igen_changing_interface_v1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
17608 _foo_igen_changing_interface_v1_on_signal_foo_signal (
17609 FooiGenChangingInterfaceV1 *object)
17611 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (object);
17613 GList *connections, *l;
17614 GVariant *signal_variant;
17615 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
17617 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
17618 for (l = connections; l != NULL; l = l->next)
17620 GDBusConnection *connection = l->data;
17621 g_dbus_connection_emit_signal (connection,
17622 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV1", "FooSignal",
17623 signal_variant, NULL);
17625 g_variant_unref (signal_variant);
17626 g_list_free_full (connections, g_object_unref);
17630 _foo_igen_changing_interface_v1_on_signal_bar_signal (
17631 FooiGenChangingInterfaceV1 *object)
17633 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (object);
17635 GList *connections, *l;
17636 GVariant *signal_variant;
17637 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
17639 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
17640 for (l = connections; l != NULL; l = l->next)
17642 GDBusConnection *connection = l->data;
17643 g_dbus_connection_emit_signal (connection,
17644 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV1", "BarSignal",
17645 signal_variant, NULL);
17647 g_variant_unref (signal_variant);
17648 g_list_free_full (connections, g_object_unref);
17652 _foo_igen_changing_interface_v1_on_signal_baz_signal (
17653 FooiGenChangingInterfaceV1 *object)
17655 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (object);
17657 GList *connections, *l;
17658 GVariant *signal_variant;
17659 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
17661 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
17662 for (l = connections; l != NULL; l = l->next)
17664 GDBusConnection *connection = l->data;
17665 g_dbus_connection_emit_signal (connection,
17666 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV1", "BazSignal",
17667 signal_variant, NULL);
17669 g_variant_unref (signal_variant);
17670 g_list_free_full (connections, g_object_unref);
17673 static void foo_igen_changing_interface_v1_skeleton_iface_init (FooiGenChangingInterfaceV1Iface *iface);
17674 G_DEFINE_TYPE_WITH_CODE (FooiGenChangingInterfaceV1Skeleton, foo_igen_changing_interface_v1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
17675 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1, foo_igen_changing_interface_v1_skeleton_iface_init));
17678 foo_igen_changing_interface_v1_skeleton_finalize (GObject *object)
17680 FooiGenChangingInterfaceV1Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V1_SKELETON (object);
17681 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
17682 if (skeleton->priv->changed_properties_idle_source != NULL)
17683 g_source_destroy (skeleton->priv->changed_properties_idle_source);
17684 g_main_context_unref (skeleton->priv->context);
17685 g_mutex_clear (&skeleton->priv->lock);
17686 G_OBJECT_CLASS (foo_igen_changing_interface_v1_skeleton_parent_class)->finalize (object);
17690 foo_igen_changing_interface_v1_skeleton_init (FooiGenChangingInterfaceV1Skeleton *skeleton)
17692 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_SKELETON, FooiGenChangingInterfaceV1SkeletonPrivate);
17693 g_mutex_init (&skeleton->priv->lock);
17694 skeleton->priv->context = g_main_context_ref_thread_default ();
17698 foo_igen_changing_interface_v1_skeleton_class_init (FooiGenChangingInterfaceV1SkeletonClass *klass)
17700 GObjectClass *gobject_class;
17701 GDBusInterfaceSkeletonClass *skeleton_class;
17703 g_type_class_add_private (klass, sizeof (FooiGenChangingInterfaceV1SkeletonPrivate));
17705 gobject_class = G_OBJECT_CLASS (klass);
17706 gobject_class->finalize = foo_igen_changing_interface_v1_skeleton_finalize;
17708 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
17709 skeleton_class->get_info = foo_igen_changing_interface_v1_skeleton_dbus_interface_get_info;
17710 skeleton_class->get_properties = foo_igen_changing_interface_v1_skeleton_dbus_interface_get_properties;
17711 skeleton_class->flush = foo_igen_changing_interface_v1_skeleton_dbus_interface_flush;
17712 skeleton_class->get_vtable = foo_igen_changing_interface_v1_skeleton_dbus_interface_get_vtable;
17716 foo_igen_changing_interface_v1_skeleton_iface_init (FooiGenChangingInterfaceV1Iface *iface)
17718 iface->foo_signal = _foo_igen_changing_interface_v1_on_signal_foo_signal;
17719 iface->bar_signal = _foo_igen_changing_interface_v1_on_signal_bar_signal;
17720 iface->baz_signal = _foo_igen_changing_interface_v1_on_signal_baz_signal;
17724 * foo_igen_changing_interface_v1_skeleton_new:
17726 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link>.
17728 * Returns: (transfer full) (type FooiGenChangingInterfaceV1Skeleton): The skeleton object.
17730 FooiGenChangingInterfaceV1 *
17731 foo_igen_changing_interface_v1_skeleton_new (void)
17733 return FOO_IGEN_CHANGING_INTERFACE_V1 (g_object_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_SKELETON, NULL));
17736 /* ------------------------------------------------------------------------
17737 * Code for interface ChangingInterfaceV2
17738 * ------------------------------------------------------------------------
17742 * SECTION:FooiGenChangingInterfaceV2
17743 * @title: FooiGenChangingInterfaceV2
17744 * @short_description: Generated C code for the ChangingInterfaceV2 D-Bus interface
17746 * This section contains code for working with the <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link> D-Bus interface in C.
17749 /* ---- Introspection data for ChangingInterfaceV2 ---- */
17751 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v2_method_info_new_method_in2 =
17760 "handle-new-method-in2",
17764 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v2_method_info_baz_method =
17773 "handle-baz-method",
17777 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v2_method_info_bar_method =
17786 "handle-bar-method",
17790 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v2_method_info_foo_method =
17799 "handle-foo-method",
17803 static const _ExtendedGDBusMethodInfo * const _foo_igen_changing_interface_v2_method_info_pointers[] =
17805 &_foo_igen_changing_interface_v2_method_info_new_method_in2,
17806 &_foo_igen_changing_interface_v2_method_info_baz_method,
17807 &_foo_igen_changing_interface_v2_method_info_bar_method,
17808 &_foo_igen_changing_interface_v2_method_info_foo_method,
17812 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v2_signal_info_new_signal_in2 =
17823 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v2_signal_info_baz_signal =
17834 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v2_signal_info_bar_signal =
17845 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v2_signal_info_foo_signal =
17856 static const _ExtendedGDBusSignalInfo * const _foo_igen_changing_interface_v2_signal_info_pointers[] =
17858 &_foo_igen_changing_interface_v2_signal_info_new_signal_in2,
17859 &_foo_igen_changing_interface_v2_signal_info_baz_signal,
17860 &_foo_igen_changing_interface_v2_signal_info_bar_signal,
17861 &_foo_igen_changing_interface_v2_signal_info_foo_signal,
17865 static const _ExtendedGDBusInterfaceInfo _foo_igen_changing_interface_v2_interface_info =
17869 "ChangingInterfaceV2",
17870 (GDBusMethodInfo **) &_foo_igen_changing_interface_v2_method_info_pointers,
17871 (GDBusSignalInfo **) &_foo_igen_changing_interface_v2_signal_info_pointers,
17875 "changing-interface-v2",
17880 * foo_igen_changing_interface_v2_interface_info:
17882 * Gets a machine-readable description of the <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link> D-Bus interface.
17884 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
17888 GDBusInterfaceInfo *
17889 foo_igen_changing_interface_v2_interface_info (void)
17891 return (GDBusInterfaceInfo *) &_foo_igen_changing_interface_v2_interface_info;
17895 * foo_igen_changing_interface_v2_override_properties:
17896 * @klass: The class structure for a #GObject<!-- -->-derived class.
17897 * @property_id_begin: The property id to assign to the first overridden property.
17899 * Overrides all #GObject properties in the #FooiGenChangingInterfaceV2 interface for a concrete class.
17900 * The properties are overridden in the order they are defined.
17902 * Returns: The last property id.
17907 foo_igen_changing_interface_v2_override_properties (GObjectClass *klass, guint property_id_begin)
17909 return property_id_begin - 1;
17915 * FooiGenChangingInterfaceV2:
17917 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link>.
17923 * FooiGenChangingInterfaceV2Iface:
17924 * @parent_iface: The parent interface.
17925 * @handle_bar_method: Handler for the #FooiGenChangingInterfaceV2::handle-bar-method signal.
17926 * @handle_baz_method: Handler for the #FooiGenChangingInterfaceV2::handle-baz-method signal.
17927 * @handle_foo_method: Handler for the #FooiGenChangingInterfaceV2::handle-foo-method signal.
17928 * @bar_signal: Handler for the #FooiGenChangingInterfaceV2::bar-signal signal.
17929 * @baz_signal: Handler for the #FooiGenChangingInterfaceV2::baz-signal signal.
17930 * @foo_signal: Handler for the #FooiGenChangingInterfaceV2::foo-signal signal.
17931 * @handle_new_method_in2: Handler for the #FooiGenChangingInterfaceV2::handle-new-method-in2 signal.
17932 * @new_signal_in2: Handler for the #FooiGenChangingInterfaceV2::new-signal-in2 signal.
17934 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link>.
17940 foo_igen_changing_interface_v2_default_init (FooiGenChangingInterfaceV2Iface *iface)
17942 /* GObject signals for incoming D-Bus method calls: */
17944 * FooiGenChangingInterfaceV2::handle-new-method-in2:
17945 * @object: A #FooiGenChangingInterfaceV2.
17946 * @invocation: A #GDBusMethodInvocation.
17948 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV2.NewMethodIn2">NewMethodIn2()</link> D-Bus method.
17950 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v2_complete_new_method_in2() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
17952 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
17956 g_signal_new ("handle-new-method-in2",
17957 G_TYPE_FROM_INTERFACE (iface),
17959 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, handle_new_method_in2),
17960 g_signal_accumulator_true_handled,
17962 g_cclosure_marshal_generic,
17965 G_TYPE_DBUS_METHOD_INVOCATION);
17968 * FooiGenChangingInterfaceV2::handle-baz-method:
17969 * @object: A #FooiGenChangingInterfaceV2.
17970 * @invocation: A #GDBusMethodInvocation.
17972 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV2.BazMethod">BazMethod()</link> D-Bus method.
17974 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v2_complete_baz_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
17976 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
17978 g_signal_new ("handle-baz-method",
17979 G_TYPE_FROM_INTERFACE (iface),
17981 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, handle_baz_method),
17982 g_signal_accumulator_true_handled,
17984 g_cclosure_marshal_generic,
17987 G_TYPE_DBUS_METHOD_INVOCATION);
17990 * FooiGenChangingInterfaceV2::handle-bar-method:
17991 * @object: A #FooiGenChangingInterfaceV2.
17992 * @invocation: A #GDBusMethodInvocation.
17994 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV2.BarMethod">BarMethod()</link> D-Bus method.
17996 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v2_complete_bar_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
17998 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
18000 g_signal_new ("handle-bar-method",
18001 G_TYPE_FROM_INTERFACE (iface),
18003 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, handle_bar_method),
18004 g_signal_accumulator_true_handled,
18006 g_cclosure_marshal_generic,
18009 G_TYPE_DBUS_METHOD_INVOCATION);
18012 * FooiGenChangingInterfaceV2::handle-foo-method:
18013 * @object: A #FooiGenChangingInterfaceV2.
18014 * @invocation: A #GDBusMethodInvocation.
18016 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV2.FooMethod">FooMethod()</link> D-Bus method.
18018 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v2_complete_foo_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
18020 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
18022 g_signal_new ("handle-foo-method",
18023 G_TYPE_FROM_INTERFACE (iface),
18025 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, handle_foo_method),
18026 g_signal_accumulator_true_handled,
18028 g_cclosure_marshal_generic,
18031 G_TYPE_DBUS_METHOD_INVOCATION);
18033 /* GObject signals for received D-Bus signals: */
18035 * FooiGenChangingInterfaceV2::new-signal-in2:
18036 * @object: A #FooiGenChangingInterfaceV2.
18038 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV2.NewSignalIn2">"NewSignalIn2"</link> is received.
18040 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
18044 g_signal_new ("new-signal-in2",
18045 G_TYPE_FROM_INTERFACE (iface),
18047 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, new_signal_in2),
18050 g_cclosure_marshal_generic,
18055 * FooiGenChangingInterfaceV2::baz-signal:
18056 * @object: A #FooiGenChangingInterfaceV2.
18058 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV2.BazSignal">"BazSignal"</link> is received.
18060 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
18062 g_signal_new ("baz-signal",
18063 G_TYPE_FROM_INTERFACE (iface),
18065 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, baz_signal),
18068 g_cclosure_marshal_generic,
18073 * FooiGenChangingInterfaceV2::bar-signal:
18074 * @object: A #FooiGenChangingInterfaceV2.
18076 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV2.BarSignal">"BarSignal"</link> is received.
18078 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
18080 g_signal_new ("bar-signal",
18081 G_TYPE_FROM_INTERFACE (iface),
18083 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, bar_signal),
18086 g_cclosure_marshal_generic,
18091 * FooiGenChangingInterfaceV2::foo-signal:
18092 * @object: A #FooiGenChangingInterfaceV2.
18094 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV2.FooSignal">"FooSignal"</link> is received.
18096 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
18098 g_signal_new ("foo-signal",
18099 G_TYPE_FROM_INTERFACE (iface),
18101 G_STRUCT_OFFSET (FooiGenChangingInterfaceV2Iface, foo_signal),
18104 g_cclosure_marshal_generic,
18110 typedef FooiGenChangingInterfaceV2Iface FooiGenChangingInterfaceV2Interface;
18111 G_DEFINE_INTERFACE (FooiGenChangingInterfaceV2, foo_igen_changing_interface_v2, G_TYPE_OBJECT);
18114 * foo_igen_changing_interface_v2_emit_new_signal_in2:
18115 * @object: A #FooiGenChangingInterfaceV2.
18117 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV2.NewSignalIn2">"NewSignalIn2"</link> D-Bus signal.
18122 foo_igen_changing_interface_v2_emit_new_signal_in2 (
18123 FooiGenChangingInterfaceV2 *object)
18125 g_signal_emit_by_name (object, "new-signal-in2");
18129 * foo_igen_changing_interface_v2_emit_baz_signal:
18130 * @object: A #FooiGenChangingInterfaceV2.
18132 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV2.BazSignal">"BazSignal"</link> D-Bus signal.
18135 foo_igen_changing_interface_v2_emit_baz_signal (
18136 FooiGenChangingInterfaceV2 *object)
18138 g_signal_emit_by_name (object, "baz-signal");
18142 * foo_igen_changing_interface_v2_emit_bar_signal:
18143 * @object: A #FooiGenChangingInterfaceV2.
18145 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV2.BarSignal">"BarSignal"</link> D-Bus signal.
18148 foo_igen_changing_interface_v2_emit_bar_signal (
18149 FooiGenChangingInterfaceV2 *object)
18151 g_signal_emit_by_name (object, "bar-signal");
18155 * foo_igen_changing_interface_v2_emit_foo_signal:
18156 * @object: A #FooiGenChangingInterfaceV2.
18158 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV2.FooSignal">"FooSignal"</link> D-Bus signal.
18161 foo_igen_changing_interface_v2_emit_foo_signal (
18162 FooiGenChangingInterfaceV2 *object)
18164 g_signal_emit_by_name (object, "foo-signal");
18168 * foo_igen_changing_interface_v2_call_new_method_in2:
18169 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18170 * @cancellable: (allow-none): A #GCancellable or %NULL.
18171 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
18172 * @user_data: User data to pass to @callback.
18174 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.NewMethodIn2">NewMethodIn2()</link> D-Bus method on @proxy.
18175 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
18176 * You can then call foo_igen_changing_interface_v2_call_new_method_in2_finish() to get the result of the operation.
18178 * See foo_igen_changing_interface_v2_call_new_method_in2_sync() for the synchronous, blocking version of this method.
18183 foo_igen_changing_interface_v2_call_new_method_in2 (
18184 FooiGenChangingInterfaceV2 *proxy,
18185 GCancellable *cancellable,
18186 GAsyncReadyCallback callback,
18187 gpointer user_data)
18189 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
18191 g_variant_new ("()"),
18192 G_DBUS_CALL_FLAGS_NONE,
18200 * foo_igen_changing_interface_v2_call_new_method_in2_finish:
18201 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18202 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v2_call_new_method_in2().
18203 * @error: Return location for error or %NULL.
18205 * Finishes an operation started with foo_igen_changing_interface_v2_call_new_method_in2().
18207 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18212 foo_igen_changing_interface_v2_call_new_method_in2_finish (
18213 FooiGenChangingInterfaceV2 *proxy,
18218 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
18221 g_variant_get (_ret,
18223 g_variant_unref (_ret);
18225 return _ret != NULL;
18229 * foo_igen_changing_interface_v2_call_new_method_in2_sync:
18230 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18231 * @cancellable: (allow-none): A #GCancellable or %NULL.
18232 * @error: Return location for error or %NULL.
18234 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.NewMethodIn2">NewMethodIn2()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
18236 * See foo_igen_changing_interface_v2_call_new_method_in2() for the asynchronous version of this method.
18238 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18243 foo_igen_changing_interface_v2_call_new_method_in2_sync (
18244 FooiGenChangingInterfaceV2 *proxy,
18245 GCancellable *cancellable,
18249 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
18251 g_variant_new ("()"),
18252 G_DBUS_CALL_FLAGS_NONE,
18258 g_variant_get (_ret,
18260 g_variant_unref (_ret);
18262 return _ret != NULL;
18266 * foo_igen_changing_interface_v2_call_baz_method:
18267 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18268 * @cancellable: (allow-none): A #GCancellable or %NULL.
18269 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
18270 * @user_data: User data to pass to @callback.
18272 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.BazMethod">BazMethod()</link> D-Bus method on @proxy.
18273 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
18274 * You can then call foo_igen_changing_interface_v2_call_baz_method_finish() to get the result of the operation.
18276 * See foo_igen_changing_interface_v2_call_baz_method_sync() for the synchronous, blocking version of this method.
18279 foo_igen_changing_interface_v2_call_baz_method (
18280 FooiGenChangingInterfaceV2 *proxy,
18281 GCancellable *cancellable,
18282 GAsyncReadyCallback callback,
18283 gpointer user_data)
18285 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
18287 g_variant_new ("()"),
18288 G_DBUS_CALL_FLAGS_NONE,
18296 * foo_igen_changing_interface_v2_call_baz_method_finish:
18297 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18298 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v2_call_baz_method().
18299 * @error: Return location for error or %NULL.
18301 * Finishes an operation started with foo_igen_changing_interface_v2_call_baz_method().
18303 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18306 foo_igen_changing_interface_v2_call_baz_method_finish (
18307 FooiGenChangingInterfaceV2 *proxy,
18312 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
18315 g_variant_get (_ret,
18317 g_variant_unref (_ret);
18319 return _ret != NULL;
18323 * foo_igen_changing_interface_v2_call_baz_method_sync:
18324 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18325 * @cancellable: (allow-none): A #GCancellable or %NULL.
18326 * @error: Return location for error or %NULL.
18328 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.BazMethod">BazMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
18330 * See foo_igen_changing_interface_v2_call_baz_method() for the asynchronous version of this method.
18332 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18335 foo_igen_changing_interface_v2_call_baz_method_sync (
18336 FooiGenChangingInterfaceV2 *proxy,
18337 GCancellable *cancellable,
18341 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
18343 g_variant_new ("()"),
18344 G_DBUS_CALL_FLAGS_NONE,
18350 g_variant_get (_ret,
18352 g_variant_unref (_ret);
18354 return _ret != NULL;
18358 * foo_igen_changing_interface_v2_call_bar_method:
18359 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18360 * @cancellable: (allow-none): A #GCancellable or %NULL.
18361 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
18362 * @user_data: User data to pass to @callback.
18364 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.BarMethod">BarMethod()</link> D-Bus method on @proxy.
18365 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
18366 * You can then call foo_igen_changing_interface_v2_call_bar_method_finish() to get the result of the operation.
18368 * See foo_igen_changing_interface_v2_call_bar_method_sync() for the synchronous, blocking version of this method.
18371 foo_igen_changing_interface_v2_call_bar_method (
18372 FooiGenChangingInterfaceV2 *proxy,
18373 GCancellable *cancellable,
18374 GAsyncReadyCallback callback,
18375 gpointer user_data)
18377 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
18379 g_variant_new ("()"),
18380 G_DBUS_CALL_FLAGS_NONE,
18388 * foo_igen_changing_interface_v2_call_bar_method_finish:
18389 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18390 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v2_call_bar_method().
18391 * @error: Return location for error or %NULL.
18393 * Finishes an operation started with foo_igen_changing_interface_v2_call_bar_method().
18395 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18398 foo_igen_changing_interface_v2_call_bar_method_finish (
18399 FooiGenChangingInterfaceV2 *proxy,
18404 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
18407 g_variant_get (_ret,
18409 g_variant_unref (_ret);
18411 return _ret != NULL;
18415 * foo_igen_changing_interface_v2_call_bar_method_sync:
18416 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18417 * @cancellable: (allow-none): A #GCancellable or %NULL.
18418 * @error: Return location for error or %NULL.
18420 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.BarMethod">BarMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
18422 * See foo_igen_changing_interface_v2_call_bar_method() for the asynchronous version of this method.
18424 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18427 foo_igen_changing_interface_v2_call_bar_method_sync (
18428 FooiGenChangingInterfaceV2 *proxy,
18429 GCancellable *cancellable,
18433 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
18435 g_variant_new ("()"),
18436 G_DBUS_CALL_FLAGS_NONE,
18442 g_variant_get (_ret,
18444 g_variant_unref (_ret);
18446 return _ret != NULL;
18450 * foo_igen_changing_interface_v2_call_foo_method:
18451 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18452 * @cancellable: (allow-none): A #GCancellable or %NULL.
18453 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
18454 * @user_data: User data to pass to @callback.
18456 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.FooMethod">FooMethod()</link> D-Bus method on @proxy.
18457 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
18458 * You can then call foo_igen_changing_interface_v2_call_foo_method_finish() to get the result of the operation.
18460 * See foo_igen_changing_interface_v2_call_foo_method_sync() for the synchronous, blocking version of this method.
18463 foo_igen_changing_interface_v2_call_foo_method (
18464 FooiGenChangingInterfaceV2 *proxy,
18465 GCancellable *cancellable,
18466 GAsyncReadyCallback callback,
18467 gpointer user_data)
18469 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
18471 g_variant_new ("()"),
18472 G_DBUS_CALL_FLAGS_NONE,
18480 * foo_igen_changing_interface_v2_call_foo_method_finish:
18481 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18482 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v2_call_foo_method().
18483 * @error: Return location for error or %NULL.
18485 * Finishes an operation started with foo_igen_changing_interface_v2_call_foo_method().
18487 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18490 foo_igen_changing_interface_v2_call_foo_method_finish (
18491 FooiGenChangingInterfaceV2 *proxy,
18496 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
18499 g_variant_get (_ret,
18501 g_variant_unref (_ret);
18503 return _ret != NULL;
18507 * foo_igen_changing_interface_v2_call_foo_method_sync:
18508 * @proxy: A #FooiGenChangingInterfaceV2Proxy.
18509 * @cancellable: (allow-none): A #GCancellable or %NULL.
18510 * @error: Return location for error or %NULL.
18512 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV2.FooMethod">FooMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
18514 * See foo_igen_changing_interface_v2_call_foo_method() for the asynchronous version of this method.
18516 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
18519 foo_igen_changing_interface_v2_call_foo_method_sync (
18520 FooiGenChangingInterfaceV2 *proxy,
18521 GCancellable *cancellable,
18525 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
18527 g_variant_new ("()"),
18528 G_DBUS_CALL_FLAGS_NONE,
18534 g_variant_get (_ret,
18536 g_variant_unref (_ret);
18538 return _ret != NULL;
18542 * foo_igen_changing_interface_v2_complete_new_method_in2:
18543 * @object: A #FooiGenChangingInterfaceV2.
18544 * @invocation: (transfer full): A #GDBusMethodInvocation.
18546 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV2.NewMethodIn2">NewMethodIn2()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
18548 * This method will free @invocation, you cannot use it afterwards.
18553 foo_igen_changing_interface_v2_complete_new_method_in2 (
18554 FooiGenChangingInterfaceV2 *object,
18555 GDBusMethodInvocation *invocation)
18557 g_dbus_method_invocation_return_value (invocation,
18558 g_variant_new ("()"));
18562 * foo_igen_changing_interface_v2_complete_baz_method:
18563 * @object: A #FooiGenChangingInterfaceV2.
18564 * @invocation: (transfer full): A #GDBusMethodInvocation.
18566 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV2.BazMethod">BazMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
18568 * This method will free @invocation, you cannot use it afterwards.
18571 foo_igen_changing_interface_v2_complete_baz_method (
18572 FooiGenChangingInterfaceV2 *object,
18573 GDBusMethodInvocation *invocation)
18575 g_dbus_method_invocation_return_value (invocation,
18576 g_variant_new ("()"));
18580 * foo_igen_changing_interface_v2_complete_bar_method:
18581 * @object: A #FooiGenChangingInterfaceV2.
18582 * @invocation: (transfer full): A #GDBusMethodInvocation.
18584 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV2.BarMethod">BarMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
18586 * This method will free @invocation, you cannot use it afterwards.
18589 foo_igen_changing_interface_v2_complete_bar_method (
18590 FooiGenChangingInterfaceV2 *object,
18591 GDBusMethodInvocation *invocation)
18593 g_dbus_method_invocation_return_value (invocation,
18594 g_variant_new ("()"));
18598 * foo_igen_changing_interface_v2_complete_foo_method:
18599 * @object: A #FooiGenChangingInterfaceV2.
18600 * @invocation: (transfer full): A #GDBusMethodInvocation.
18602 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV2.FooMethod">FooMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
18604 * This method will free @invocation, you cannot use it afterwards.
18607 foo_igen_changing_interface_v2_complete_foo_method (
18608 FooiGenChangingInterfaceV2 *object,
18609 GDBusMethodInvocation *invocation)
18611 g_dbus_method_invocation_return_value (invocation,
18612 g_variant_new ("()"));
18615 /* ------------------------------------------------------------------------ */
18618 * FooiGenChangingInterfaceV2Proxy:
18620 * The #FooiGenChangingInterfaceV2Proxy structure contains only private data and should only be accessed using the provided API.
18626 * FooiGenChangingInterfaceV2ProxyClass:
18627 * @parent_class: The parent class.
18629 * Class structure for #FooiGenChangingInterfaceV2Proxy.
18634 struct _FooiGenChangingInterfaceV2ProxyPrivate
18639 static void foo_igen_changing_interface_v2_proxy_iface_init (FooiGenChangingInterfaceV2Iface *iface);
18641 G_DEFINE_TYPE_WITH_CODE (FooiGenChangingInterfaceV2Proxy, foo_igen_changing_interface_v2_proxy, G_TYPE_DBUS_PROXY,
18642 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2, foo_igen_changing_interface_v2_proxy_iface_init));
18645 foo_igen_changing_interface_v2_proxy_finalize (GObject *object)
18647 FooiGenChangingInterfaceV2Proxy *proxy = FOO_IGEN_CHANGING_INTERFACE_V2_PROXY (object);
18648 g_datalist_clear (&proxy->priv->qdata);
18649 G_OBJECT_CLASS (foo_igen_changing_interface_v2_proxy_parent_class)->finalize (object);
18653 foo_igen_changing_interface_v2_proxy_get_property (GObject *object,
18661 foo_igen_changing_interface_v2_proxy_set_property (GObject *object,
18663 const GValue *value,
18669 foo_igen_changing_interface_v2_proxy_g_signal (GDBusProxy *proxy,
18670 const gchar *sender_name,
18671 const gchar *signal_name,
18672 GVariant *parameters)
18674 _ExtendedGDBusSignalInfo *info;
18681 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v2_interface_info, signal_name);
18684 num_params = g_variant_n_children (parameters);
18685 paramv = g_new0 (GValue, num_params + 1);
18686 g_value_init (¶mv[0], FOO_IGEN_TYPE_CHANGING_INTERFACE_V2);
18687 g_value_set_object (¶mv[0], proxy);
18688 g_variant_iter_init (&iter, parameters);
18690 while ((child = g_variant_iter_next_value (&iter)) != NULL)
18692 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
18693 if (arg_info->use_gvariant)
18695 g_value_init (¶mv[n], G_TYPE_VARIANT);
18696 g_value_set_variant (¶mv[n], child);
18700 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
18701 g_variant_unref (child);
18703 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_CHANGING_INTERFACE_V2);
18704 g_signal_emitv (paramv, signal_id, 0, NULL);
18705 for (n = 0; n < num_params + 1; n++)
18706 g_value_unset (¶mv[n]);
18711 foo_igen_changing_interface_v2_proxy_g_properties_changed (GDBusProxy *_proxy,
18712 GVariant *changed_properties,
18713 const gchar *const *invalidated_properties)
18715 FooiGenChangingInterfaceV2Proxy *proxy = FOO_IGEN_CHANGING_INTERFACE_V2_PROXY (_proxy);
18718 GVariantIter *iter;
18719 _ExtendedGDBusPropertyInfo *info;
18720 g_variant_get (changed_properties, "a{sv}", &iter);
18721 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
18723 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v2_interface_info, key);
18724 g_datalist_remove_data (&proxy->priv->qdata, key);
18726 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
18728 g_variant_iter_free (iter);
18729 for (n = 0; invalidated_properties[n] != NULL; n++)
18731 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v2_interface_info, invalidated_properties[n]);
18732 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
18734 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
18739 foo_igen_changing_interface_v2_proxy_init (FooiGenChangingInterfaceV2Proxy *proxy)
18741 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_PROXY, FooiGenChangingInterfaceV2ProxyPrivate);
18742 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_changing_interface_v2_interface_info ());
18746 foo_igen_changing_interface_v2_proxy_class_init (FooiGenChangingInterfaceV2ProxyClass *klass)
18748 GObjectClass *gobject_class;
18749 GDBusProxyClass *proxy_class;
18751 g_type_class_add_private (klass, sizeof (FooiGenChangingInterfaceV2ProxyPrivate));
18753 gobject_class = G_OBJECT_CLASS (klass);
18754 gobject_class->finalize = foo_igen_changing_interface_v2_proxy_finalize;
18755 gobject_class->get_property = foo_igen_changing_interface_v2_proxy_get_property;
18756 gobject_class->set_property = foo_igen_changing_interface_v2_proxy_set_property;
18758 proxy_class = G_DBUS_PROXY_CLASS (klass);
18759 proxy_class->g_signal = foo_igen_changing_interface_v2_proxy_g_signal;
18760 proxy_class->g_properties_changed = foo_igen_changing_interface_v2_proxy_g_properties_changed;
18765 foo_igen_changing_interface_v2_proxy_iface_init (FooiGenChangingInterfaceV2Iface *iface)
18770 * foo_igen_changing_interface_v2_proxy_new:
18771 * @connection: A #GDBusConnection.
18772 * @flags: Flags from the #GDBusProxyFlags enumeration.
18773 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18774 * @object_path: An object path.
18775 * @cancellable: (allow-none): A #GCancellable or %NULL.
18776 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
18777 * @user_data: User data to pass to @callback.
18779 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link>. See g_dbus_proxy_new() for more details.
18781 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
18782 * You can then call foo_igen_changing_interface_v2_proxy_new_finish() to get the result of the operation.
18784 * See foo_igen_changing_interface_v2_proxy_new_sync() for the synchronous, blocking version of this constructor.
18789 foo_igen_changing_interface_v2_proxy_new (
18790 GDBusConnection *connection,
18791 GDBusProxyFlags flags,
18793 const gchar *object_path,
18794 GCancellable *cancellable,
18795 GAsyncReadyCallback callback,
18796 gpointer user_data)
18798 g_async_initable_new_async (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_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", "ChangingInterfaceV2", NULL);
18802 * foo_igen_changing_interface_v2_proxy_new_finish:
18803 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v2_proxy_new().
18804 * @error: Return location for error or %NULL
18806 * Finishes an operation started with foo_igen_changing_interface_v2_proxy_new().
18808 * Returns: (transfer full) (type FooiGenChangingInterfaceV2Proxy): The constructed proxy object or %NULL if @error is set.
18812 FooiGenChangingInterfaceV2 *
18813 foo_igen_changing_interface_v2_proxy_new_finish (
18818 GObject *source_object;
18819 source_object = g_async_result_get_source_object (res);
18820 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
18821 g_object_unref (source_object);
18823 return FOO_IGEN_CHANGING_INTERFACE_V2 (ret);
18829 * foo_igen_changing_interface_v2_proxy_new_sync:
18830 * @connection: A #GDBusConnection.
18831 * @flags: Flags from the #GDBusProxyFlags enumeration.
18832 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18833 * @object_path: An object path.
18834 * @cancellable: (allow-none): A #GCancellable or %NULL.
18835 * @error: Return location for error or %NULL
18837 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link>. See g_dbus_proxy_new_sync() for more details.
18839 * The calling thread is blocked until a reply is received.
18841 * See foo_igen_changing_interface_v2_proxy_new() for the asynchronous version of this constructor.
18843 * Returns: (transfer full) (type FooiGenChangingInterfaceV2Proxy): The constructed proxy object or %NULL if @error is set.
18847 FooiGenChangingInterfaceV2 *
18848 foo_igen_changing_interface_v2_proxy_new_sync (
18849 GDBusConnection *connection,
18850 GDBusProxyFlags flags,
18852 const gchar *object_path,
18853 GCancellable *cancellable,
18857 ret = g_initable_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "ChangingInterfaceV2", NULL);
18859 return FOO_IGEN_CHANGING_INTERFACE_V2 (ret);
18866 * foo_igen_changing_interface_v2_proxy_new_for_bus:
18867 * @bus_type: A #GBusType.
18868 * @flags: Flags from the #GDBusProxyFlags enumeration.
18869 * @name: A bus name (well-known or unique).
18870 * @object_path: An object path.
18871 * @cancellable: (allow-none): A #GCancellable or %NULL.
18872 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
18873 * @user_data: User data to pass to @callback.
18875 * Like foo_igen_changing_interface_v2_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
18877 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
18878 * You can then call foo_igen_changing_interface_v2_proxy_new_for_bus_finish() to get the result of the operation.
18880 * See foo_igen_changing_interface_v2_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
18885 foo_igen_changing_interface_v2_proxy_new_for_bus (
18887 GDBusProxyFlags flags,
18889 const gchar *object_path,
18890 GCancellable *cancellable,
18891 GAsyncReadyCallback callback,
18892 gpointer user_data)
18894 g_async_initable_new_async (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_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", "ChangingInterfaceV2", NULL);
18898 * foo_igen_changing_interface_v2_proxy_new_for_bus_finish:
18899 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v2_proxy_new_for_bus().
18900 * @error: Return location for error or %NULL
18902 * Finishes an operation started with foo_igen_changing_interface_v2_proxy_new_for_bus().
18904 * Returns: (transfer full) (type FooiGenChangingInterfaceV2Proxy): The constructed proxy object or %NULL if @error is set.
18908 FooiGenChangingInterfaceV2 *
18909 foo_igen_changing_interface_v2_proxy_new_for_bus_finish (
18914 GObject *source_object;
18915 source_object = g_async_result_get_source_object (res);
18916 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
18917 g_object_unref (source_object);
18919 return FOO_IGEN_CHANGING_INTERFACE_V2 (ret);
18925 * foo_igen_changing_interface_v2_proxy_new_for_bus_sync:
18926 * @bus_type: A #GBusType.
18927 * @flags: Flags from the #GDBusProxyFlags enumeration.
18928 * @name: A bus name (well-known or unique).
18929 * @object_path: An object path.
18930 * @cancellable: (allow-none): A #GCancellable or %NULL.
18931 * @error: Return location for error or %NULL
18933 * Like foo_igen_changing_interface_v2_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
18935 * The calling thread is blocked until a reply is received.
18937 * See foo_igen_changing_interface_v2_proxy_new_for_bus() for the asynchronous version of this constructor.
18939 * Returns: (transfer full) (type FooiGenChangingInterfaceV2Proxy): The constructed proxy object or %NULL if @error is set.
18943 FooiGenChangingInterfaceV2 *
18944 foo_igen_changing_interface_v2_proxy_new_for_bus_sync (
18946 GDBusProxyFlags flags,
18948 const gchar *object_path,
18949 GCancellable *cancellable,
18953 ret = g_initable_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "ChangingInterfaceV2", NULL);
18955 return FOO_IGEN_CHANGING_INTERFACE_V2 (ret);
18961 /* ------------------------------------------------------------------------ */
18964 * FooiGenChangingInterfaceV2Skeleton:
18966 * The #FooiGenChangingInterfaceV2Skeleton structure contains only private data and should only be accessed using the provided API.
18972 * FooiGenChangingInterfaceV2SkeletonClass:
18973 * @parent_class: The parent class.
18975 * Class structure for #FooiGenChangingInterfaceV2Skeleton.
18980 struct _FooiGenChangingInterfaceV2SkeletonPrivate
18982 GValue *properties;
18983 GList *changed_properties;
18984 GSource *changed_properties_idle_source;
18985 GMainContext *context;
18990 _foo_igen_changing_interface_v2_skeleton_handle_method_call (
18991 GDBusConnection *connection,
18992 const gchar *sender,
18993 const gchar *object_path,
18994 const gchar *interface_name,
18995 const gchar *method_name,
18996 GVariant *parameters,
18997 GDBusMethodInvocation *invocation,
18998 gpointer user_data)
19000 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (user_data);
19001 _ExtendedGDBusMethodInfo *info;
19009 GValue return_value = G_VALUE_INIT;
19010 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
19011 g_assert (info != NULL);
19012 num_params = g_variant_n_children (parameters);
19013 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
19015 g_value_init (¶mv[n], FOO_IGEN_TYPE_CHANGING_INTERFACE_V2);
19016 g_value_set_object (¶mv[n++], skeleton);
19017 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
19018 g_value_set_object (¶mv[n++], invocation);
19019 if (info->pass_fdlist)
19022 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
19023 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
19025 g_assert_not_reached ();
19028 g_variant_iter_init (&iter, parameters);
19029 while ((child = g_variant_iter_next_value (&iter)) != NULL)
19031 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
19032 if (arg_info->use_gvariant)
19034 g_value_init (¶mv[n], G_TYPE_VARIANT);
19035 g_value_set_variant (¶mv[n], child);
19039 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
19040 g_variant_unref (child);
19042 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_CHANGING_INTERFACE_V2);
19043 g_value_init (&return_value, G_TYPE_BOOLEAN);
19044 g_signal_emitv (paramv, signal_id, 0, &return_value);
19045 if (!g_value_get_boolean (&return_value))
19046 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
19047 g_value_unset (&return_value);
19048 for (n = 0; n < num_params + num_extra; n++)
19049 g_value_unset (¶mv[n]);
19054 _foo_igen_changing_interface_v2_skeleton_handle_get_property (
19055 GDBusConnection *connection,
19056 const gchar *sender,
19057 const gchar *object_path,
19058 const gchar *interface_name,
19059 const gchar *property_name,
19061 gpointer user_data)
19063 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (user_data);
19064 GValue value = G_VALUE_INIT;
19066 _ExtendedGDBusPropertyInfo *info;
19069 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v2_interface_info, property_name);
19070 g_assert (info != NULL);
19071 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
19074 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
19078 g_value_init (&value, pspec->value_type);
19079 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
19080 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
19081 g_value_unset (&value);
19087 _foo_igen_changing_interface_v2_skeleton_handle_set_property (
19088 GDBusConnection *connection,
19089 const gchar *sender,
19090 const gchar *object_path,
19091 const gchar *interface_name,
19092 const gchar *property_name,
19095 gpointer user_data)
19097 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (user_data);
19098 GValue value = G_VALUE_INIT;
19100 _ExtendedGDBusPropertyInfo *info;
19103 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v2_interface_info, property_name);
19104 g_assert (info != NULL);
19105 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
19108 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
19112 if (info->use_gvariant)
19113 g_value_set_variant (&value, variant);
19115 g_dbus_gvariant_to_gvalue (variant, &value);
19116 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
19117 g_value_unset (&value);
19123 static const GDBusInterfaceVTable _foo_igen_changing_interface_v2_skeleton_vtable =
19125 _foo_igen_changing_interface_v2_skeleton_handle_method_call,
19126 _foo_igen_changing_interface_v2_skeleton_handle_get_property,
19127 _foo_igen_changing_interface_v2_skeleton_handle_set_property
19130 static GDBusInterfaceInfo *
19131 foo_igen_changing_interface_v2_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
19133 return foo_igen_changing_interface_v2_interface_info ();
19136 static GDBusInterfaceVTable *
19137 foo_igen_changing_interface_v2_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
19139 return (GDBusInterfaceVTable *) &_foo_igen_changing_interface_v2_skeleton_vtable;
19143 foo_igen_changing_interface_v2_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
19145 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (_skeleton);
19147 GVariantBuilder builder;
19149 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
19150 if (_foo_igen_changing_interface_v2_interface_info.parent_struct.properties == NULL)
19152 for (n = 0; _foo_igen_changing_interface_v2_interface_info.parent_struct.properties[n] != NULL; n++)
19154 GDBusPropertyInfo *info = _foo_igen_changing_interface_v2_interface_info.parent_struct.properties[n];
19155 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
19158 value = _foo_igen_changing_interface_v2_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV2", info->name, NULL, skeleton);
19161 g_variant_take_ref (value);
19162 g_variant_builder_add (&builder, "{sv}", info->name, value);
19163 g_variant_unref (value);
19168 return g_variant_builder_end (&builder);
19172 foo_igen_changing_interface_v2_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
19177 _foo_igen_changing_interface_v2_on_signal_new_signal_in2 (
19178 FooiGenChangingInterfaceV2 *object)
19180 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (object);
19182 GList *connections, *l;
19183 GVariant *signal_variant;
19184 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
19186 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
19187 for (l = connections; l != NULL; l = l->next)
19189 GDBusConnection *connection = l->data;
19190 g_dbus_connection_emit_signal (connection,
19191 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV2", "NewSignalIn2",
19192 signal_variant, NULL);
19194 g_variant_unref (signal_variant);
19195 g_list_free_full (connections, g_object_unref);
19199 _foo_igen_changing_interface_v2_on_signal_baz_signal (
19200 FooiGenChangingInterfaceV2 *object)
19202 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (object);
19204 GList *connections, *l;
19205 GVariant *signal_variant;
19206 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
19208 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
19209 for (l = connections; l != NULL; l = l->next)
19211 GDBusConnection *connection = l->data;
19212 g_dbus_connection_emit_signal (connection,
19213 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV2", "BazSignal",
19214 signal_variant, NULL);
19216 g_variant_unref (signal_variant);
19217 g_list_free_full (connections, g_object_unref);
19221 _foo_igen_changing_interface_v2_on_signal_bar_signal (
19222 FooiGenChangingInterfaceV2 *object)
19224 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (object);
19226 GList *connections, *l;
19227 GVariant *signal_variant;
19228 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
19230 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
19231 for (l = connections; l != NULL; l = l->next)
19233 GDBusConnection *connection = l->data;
19234 g_dbus_connection_emit_signal (connection,
19235 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV2", "BarSignal",
19236 signal_variant, NULL);
19238 g_variant_unref (signal_variant);
19239 g_list_free_full (connections, g_object_unref);
19243 _foo_igen_changing_interface_v2_on_signal_foo_signal (
19244 FooiGenChangingInterfaceV2 *object)
19246 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (object);
19248 GList *connections, *l;
19249 GVariant *signal_variant;
19250 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
19252 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
19253 for (l = connections; l != NULL; l = l->next)
19255 GDBusConnection *connection = l->data;
19256 g_dbus_connection_emit_signal (connection,
19257 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV2", "FooSignal",
19258 signal_variant, NULL);
19260 g_variant_unref (signal_variant);
19261 g_list_free_full (connections, g_object_unref);
19264 static void foo_igen_changing_interface_v2_skeleton_iface_init (FooiGenChangingInterfaceV2Iface *iface);
19265 G_DEFINE_TYPE_WITH_CODE (FooiGenChangingInterfaceV2Skeleton, foo_igen_changing_interface_v2_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
19266 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2, foo_igen_changing_interface_v2_skeleton_iface_init));
19269 foo_igen_changing_interface_v2_skeleton_finalize (GObject *object)
19271 FooiGenChangingInterfaceV2Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V2_SKELETON (object);
19272 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
19273 if (skeleton->priv->changed_properties_idle_source != NULL)
19274 g_source_destroy (skeleton->priv->changed_properties_idle_source);
19275 g_main_context_unref (skeleton->priv->context);
19276 g_mutex_clear (&skeleton->priv->lock);
19277 G_OBJECT_CLASS (foo_igen_changing_interface_v2_skeleton_parent_class)->finalize (object);
19281 foo_igen_changing_interface_v2_skeleton_init (FooiGenChangingInterfaceV2Skeleton *skeleton)
19283 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_SKELETON, FooiGenChangingInterfaceV2SkeletonPrivate);
19284 g_mutex_init (&skeleton->priv->lock);
19285 skeleton->priv->context = g_main_context_ref_thread_default ();
19289 foo_igen_changing_interface_v2_skeleton_class_init (FooiGenChangingInterfaceV2SkeletonClass *klass)
19291 GObjectClass *gobject_class;
19292 GDBusInterfaceSkeletonClass *skeleton_class;
19294 g_type_class_add_private (klass, sizeof (FooiGenChangingInterfaceV2SkeletonPrivate));
19296 gobject_class = G_OBJECT_CLASS (klass);
19297 gobject_class->finalize = foo_igen_changing_interface_v2_skeleton_finalize;
19299 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
19300 skeleton_class->get_info = foo_igen_changing_interface_v2_skeleton_dbus_interface_get_info;
19301 skeleton_class->get_properties = foo_igen_changing_interface_v2_skeleton_dbus_interface_get_properties;
19302 skeleton_class->flush = foo_igen_changing_interface_v2_skeleton_dbus_interface_flush;
19303 skeleton_class->get_vtable = foo_igen_changing_interface_v2_skeleton_dbus_interface_get_vtable;
19307 foo_igen_changing_interface_v2_skeleton_iface_init (FooiGenChangingInterfaceV2Iface *iface)
19309 iface->new_signal_in2 = _foo_igen_changing_interface_v2_on_signal_new_signal_in2;
19310 iface->baz_signal = _foo_igen_changing_interface_v2_on_signal_baz_signal;
19311 iface->bar_signal = _foo_igen_changing_interface_v2_on_signal_bar_signal;
19312 iface->foo_signal = _foo_igen_changing_interface_v2_on_signal_foo_signal;
19316 * foo_igen_changing_interface_v2_skeleton_new:
19318 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link>.
19320 * Returns: (transfer full) (type FooiGenChangingInterfaceV2Skeleton): The skeleton object.
19324 FooiGenChangingInterfaceV2 *
19325 foo_igen_changing_interface_v2_skeleton_new (void)
19327 return FOO_IGEN_CHANGING_INTERFACE_V2 (g_object_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_SKELETON, NULL));
19330 /* ------------------------------------------------------------------------
19331 * Code for interface ChangingInterfaceV10
19332 * ------------------------------------------------------------------------
19336 * SECTION:FooiGenChangingInterfaceV10
19337 * @title: FooiGenChangingInterfaceV10
19338 * @short_description: Generated C code for the ChangingInterfaceV10 D-Bus interface
19340 * This section contains code for working with the <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link> D-Bus interface in C.
19343 /* ---- Introspection data for ChangingInterfaceV10 ---- */
19345 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v10_method_info_added_method_in10 =
19354 "handle-added-method-in10",
19358 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v10_method_info_new_method_in2 =
19367 "handle-new-method-in2",
19371 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v10_method_info_baz_method =
19380 "handle-baz-method",
19384 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v10_method_info_bar_method =
19393 "handle-bar-method",
19397 static const _ExtendedGDBusMethodInfo _foo_igen_changing_interface_v10_method_info_foo_method =
19406 "handle-foo-method",
19410 static const _ExtendedGDBusMethodInfo * const _foo_igen_changing_interface_v10_method_info_pointers[] =
19412 &_foo_igen_changing_interface_v10_method_info_added_method_in10,
19413 &_foo_igen_changing_interface_v10_method_info_new_method_in2,
19414 &_foo_igen_changing_interface_v10_method_info_baz_method,
19415 &_foo_igen_changing_interface_v10_method_info_bar_method,
19416 &_foo_igen_changing_interface_v10_method_info_foo_method,
19420 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v10_signal_info_added_signal_in10 =
19428 "added-signal-in10"
19431 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v10_signal_info_new_signal_in2 =
19442 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v10_signal_info_baz_signal =
19453 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v10_signal_info_bar_signal =
19464 static const _ExtendedGDBusSignalInfo _foo_igen_changing_interface_v10_signal_info_foo_signal =
19475 static const _ExtendedGDBusSignalInfo * const _foo_igen_changing_interface_v10_signal_info_pointers[] =
19477 &_foo_igen_changing_interface_v10_signal_info_added_signal_in10,
19478 &_foo_igen_changing_interface_v10_signal_info_new_signal_in2,
19479 &_foo_igen_changing_interface_v10_signal_info_baz_signal,
19480 &_foo_igen_changing_interface_v10_signal_info_bar_signal,
19481 &_foo_igen_changing_interface_v10_signal_info_foo_signal,
19485 static const _ExtendedGDBusInterfaceInfo _foo_igen_changing_interface_v10_interface_info =
19489 "ChangingInterfaceV10",
19490 (GDBusMethodInfo **) &_foo_igen_changing_interface_v10_method_info_pointers,
19491 (GDBusSignalInfo **) &_foo_igen_changing_interface_v10_signal_info_pointers,
19495 "changing-interface-v10",
19500 * foo_igen_changing_interface_v10_interface_info:
19502 * Gets a machine-readable description of the <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link> D-Bus interface.
19504 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
19508 GDBusInterfaceInfo *
19509 foo_igen_changing_interface_v10_interface_info (void)
19511 return (GDBusInterfaceInfo *) &_foo_igen_changing_interface_v10_interface_info;
19515 * foo_igen_changing_interface_v10_override_properties:
19516 * @klass: The class structure for a #GObject<!-- -->-derived class.
19517 * @property_id_begin: The property id to assign to the first overridden property.
19519 * Overrides all #GObject properties in the #FooiGenChangingInterfaceV10 interface for a concrete class.
19520 * The properties are overridden in the order they are defined.
19522 * Returns: The last property id.
19527 foo_igen_changing_interface_v10_override_properties (GObjectClass *klass, guint property_id_begin)
19529 return property_id_begin - 1;
19535 * FooiGenChangingInterfaceV10:
19537 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link>.
19543 * FooiGenChangingInterfaceV10Iface:
19544 * @parent_iface: The parent interface.
19545 * @handle_bar_method: Handler for the #FooiGenChangingInterfaceV10::handle-bar-method signal.
19546 * @handle_baz_method: Handler for the #FooiGenChangingInterfaceV10::handle-baz-method signal.
19547 * @handle_foo_method: Handler for the #FooiGenChangingInterfaceV10::handle-foo-method signal.
19548 * @bar_signal: Handler for the #FooiGenChangingInterfaceV10::bar-signal signal.
19549 * @baz_signal: Handler for the #FooiGenChangingInterfaceV10::baz-signal signal.
19550 * @foo_signal: Handler for the #FooiGenChangingInterfaceV10::foo-signal signal.
19551 * @handle_new_method_in2: Handler for the #FooiGenChangingInterfaceV10::handle-new-method-in2 signal.
19552 * @new_signal_in2: Handler for the #FooiGenChangingInterfaceV10::new-signal-in2 signal.
19553 * @handle_added_method_in10: Handler for the #FooiGenChangingInterfaceV10::handle-added-method-in10 signal.
19554 * @added_signal_in10: Handler for the #FooiGenChangingInterfaceV10::added-signal-in10 signal.
19556 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link>.
19562 foo_igen_changing_interface_v10_default_init (FooiGenChangingInterfaceV10Iface *iface)
19564 /* GObject signals for incoming D-Bus method calls: */
19566 * FooiGenChangingInterfaceV10::handle-added-method-in10:
19567 * @object: A #FooiGenChangingInterfaceV10.
19568 * @invocation: A #GDBusMethodInvocation.
19570 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV10.AddedMethodIn10">AddedMethodIn10()</link> D-Bus method.
19572 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v10_complete_added_method_in10() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
19574 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
19578 g_signal_new ("handle-added-method-in10",
19579 G_TYPE_FROM_INTERFACE (iface),
19581 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, handle_added_method_in10),
19582 g_signal_accumulator_true_handled,
19584 g_cclosure_marshal_generic,
19587 G_TYPE_DBUS_METHOD_INVOCATION);
19590 * FooiGenChangingInterfaceV10::handle-new-method-in2:
19591 * @object: A #FooiGenChangingInterfaceV10.
19592 * @invocation: A #GDBusMethodInvocation.
19594 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV10.NewMethodIn2">NewMethodIn2()</link> D-Bus method.
19596 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v10_complete_new_method_in2() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
19598 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
19602 g_signal_new ("handle-new-method-in2",
19603 G_TYPE_FROM_INTERFACE (iface),
19605 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, handle_new_method_in2),
19606 g_signal_accumulator_true_handled,
19608 g_cclosure_marshal_generic,
19611 G_TYPE_DBUS_METHOD_INVOCATION);
19614 * FooiGenChangingInterfaceV10::handle-baz-method:
19615 * @object: A #FooiGenChangingInterfaceV10.
19616 * @invocation: A #GDBusMethodInvocation.
19618 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV10.BazMethod">BazMethod()</link> D-Bus method.
19620 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v10_complete_baz_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
19622 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
19624 g_signal_new ("handle-baz-method",
19625 G_TYPE_FROM_INTERFACE (iface),
19627 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, handle_baz_method),
19628 g_signal_accumulator_true_handled,
19630 g_cclosure_marshal_generic,
19633 G_TYPE_DBUS_METHOD_INVOCATION);
19636 * FooiGenChangingInterfaceV10::handle-bar-method:
19637 * @object: A #FooiGenChangingInterfaceV10.
19638 * @invocation: A #GDBusMethodInvocation.
19640 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV10.BarMethod">BarMethod()</link> D-Bus method.
19642 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v10_complete_bar_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
19644 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
19646 g_signal_new ("handle-bar-method",
19647 G_TYPE_FROM_INTERFACE (iface),
19649 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, handle_bar_method),
19650 g_signal_accumulator_true_handled,
19652 g_cclosure_marshal_generic,
19655 G_TYPE_DBUS_METHOD_INVOCATION);
19658 * FooiGenChangingInterfaceV10::handle-foo-method:
19659 * @object: A #FooiGenChangingInterfaceV10.
19660 * @invocation: A #GDBusMethodInvocation.
19662 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-ChangingInterfaceV10.FooMethod">FooMethod()</link> D-Bus method.
19664 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_changing_interface_v10_complete_foo_method() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
19666 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
19668 g_signal_new ("handle-foo-method",
19669 G_TYPE_FROM_INTERFACE (iface),
19671 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, handle_foo_method),
19672 g_signal_accumulator_true_handled,
19674 g_cclosure_marshal_generic,
19677 G_TYPE_DBUS_METHOD_INVOCATION);
19679 /* GObject signals for received D-Bus signals: */
19681 * FooiGenChangingInterfaceV10::added-signal-in10:
19682 * @object: A #FooiGenChangingInterfaceV10.
19684 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV10.AddedSignalIn10">"AddedSignalIn10"</link> is received.
19686 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
19690 g_signal_new ("added-signal-in10",
19691 G_TYPE_FROM_INTERFACE (iface),
19693 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, added_signal_in10),
19696 g_cclosure_marshal_generic,
19701 * FooiGenChangingInterfaceV10::new-signal-in2:
19702 * @object: A #FooiGenChangingInterfaceV10.
19704 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV10.NewSignalIn2">"NewSignalIn2"</link> is received.
19706 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
19710 g_signal_new ("new-signal-in2",
19711 G_TYPE_FROM_INTERFACE (iface),
19713 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, new_signal_in2),
19716 g_cclosure_marshal_generic,
19721 * FooiGenChangingInterfaceV10::baz-signal:
19722 * @object: A #FooiGenChangingInterfaceV10.
19724 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV10.BazSignal">"BazSignal"</link> is received.
19726 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
19728 g_signal_new ("baz-signal",
19729 G_TYPE_FROM_INTERFACE (iface),
19731 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, baz_signal),
19734 g_cclosure_marshal_generic,
19739 * FooiGenChangingInterfaceV10::bar-signal:
19740 * @object: A #FooiGenChangingInterfaceV10.
19742 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV10.BarSignal">"BarSignal"</link> is received.
19744 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
19746 g_signal_new ("bar-signal",
19747 G_TYPE_FROM_INTERFACE (iface),
19749 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, bar_signal),
19752 g_cclosure_marshal_generic,
19757 * FooiGenChangingInterfaceV10::foo-signal:
19758 * @object: A #FooiGenChangingInterfaceV10.
19760 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-ChangingInterfaceV10.FooSignal">"FooSignal"</link> is received.
19762 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
19764 g_signal_new ("foo-signal",
19765 G_TYPE_FROM_INTERFACE (iface),
19767 G_STRUCT_OFFSET (FooiGenChangingInterfaceV10Iface, foo_signal),
19770 g_cclosure_marshal_generic,
19776 typedef FooiGenChangingInterfaceV10Iface FooiGenChangingInterfaceV10Interface;
19777 G_DEFINE_INTERFACE (FooiGenChangingInterfaceV10, foo_igen_changing_interface_v10, G_TYPE_OBJECT);
19780 * foo_igen_changing_interface_v10_emit_added_signal_in10:
19781 * @object: A #FooiGenChangingInterfaceV10.
19783 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV10.AddedSignalIn10">"AddedSignalIn10"</link> D-Bus signal.
19788 foo_igen_changing_interface_v10_emit_added_signal_in10 (
19789 FooiGenChangingInterfaceV10 *object)
19791 g_signal_emit_by_name (object, "added-signal-in10");
19795 * foo_igen_changing_interface_v10_emit_new_signal_in2:
19796 * @object: A #FooiGenChangingInterfaceV10.
19798 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV10.NewSignalIn2">"NewSignalIn2"</link> D-Bus signal.
19803 foo_igen_changing_interface_v10_emit_new_signal_in2 (
19804 FooiGenChangingInterfaceV10 *object)
19806 g_signal_emit_by_name (object, "new-signal-in2");
19810 * foo_igen_changing_interface_v10_emit_baz_signal:
19811 * @object: A #FooiGenChangingInterfaceV10.
19813 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV10.BazSignal">"BazSignal"</link> D-Bus signal.
19816 foo_igen_changing_interface_v10_emit_baz_signal (
19817 FooiGenChangingInterfaceV10 *object)
19819 g_signal_emit_by_name (object, "baz-signal");
19823 * foo_igen_changing_interface_v10_emit_bar_signal:
19824 * @object: A #FooiGenChangingInterfaceV10.
19826 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV10.BarSignal">"BarSignal"</link> D-Bus signal.
19829 foo_igen_changing_interface_v10_emit_bar_signal (
19830 FooiGenChangingInterfaceV10 *object)
19832 g_signal_emit_by_name (object, "bar-signal");
19836 * foo_igen_changing_interface_v10_emit_foo_signal:
19837 * @object: A #FooiGenChangingInterfaceV10.
19839 * Emits the <link linkend="gdbus-signal-ChangingInterfaceV10.FooSignal">"FooSignal"</link> D-Bus signal.
19842 foo_igen_changing_interface_v10_emit_foo_signal (
19843 FooiGenChangingInterfaceV10 *object)
19845 g_signal_emit_by_name (object, "foo-signal");
19849 * foo_igen_changing_interface_v10_call_added_method_in10:
19850 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
19851 * @cancellable: (allow-none): A #GCancellable or %NULL.
19852 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
19853 * @user_data: User data to pass to @callback.
19855 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.AddedMethodIn10">AddedMethodIn10()</link> D-Bus method on @proxy.
19856 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
19857 * You can then call foo_igen_changing_interface_v10_call_added_method_in10_finish() to get the result of the operation.
19859 * See foo_igen_changing_interface_v10_call_added_method_in10_sync() for the synchronous, blocking version of this method.
19864 foo_igen_changing_interface_v10_call_added_method_in10 (
19865 FooiGenChangingInterfaceV10 *proxy,
19866 GCancellable *cancellable,
19867 GAsyncReadyCallback callback,
19868 gpointer user_data)
19870 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
19872 g_variant_new ("()"),
19873 G_DBUS_CALL_FLAGS_NONE,
19881 * foo_igen_changing_interface_v10_call_added_method_in10_finish:
19882 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
19883 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_call_added_method_in10().
19884 * @error: Return location for error or %NULL.
19886 * Finishes an operation started with foo_igen_changing_interface_v10_call_added_method_in10().
19888 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
19893 foo_igen_changing_interface_v10_call_added_method_in10_finish (
19894 FooiGenChangingInterfaceV10 *proxy,
19899 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
19902 g_variant_get (_ret,
19904 g_variant_unref (_ret);
19906 return _ret != NULL;
19910 * foo_igen_changing_interface_v10_call_added_method_in10_sync:
19911 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
19912 * @cancellable: (allow-none): A #GCancellable or %NULL.
19913 * @error: Return location for error or %NULL.
19915 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.AddedMethodIn10">AddedMethodIn10()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
19917 * See foo_igen_changing_interface_v10_call_added_method_in10() for the asynchronous version of this method.
19919 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
19924 foo_igen_changing_interface_v10_call_added_method_in10_sync (
19925 FooiGenChangingInterfaceV10 *proxy,
19926 GCancellable *cancellable,
19930 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
19932 g_variant_new ("()"),
19933 G_DBUS_CALL_FLAGS_NONE,
19939 g_variant_get (_ret,
19941 g_variant_unref (_ret);
19943 return _ret != NULL;
19947 * foo_igen_changing_interface_v10_call_new_method_in2:
19948 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
19949 * @cancellable: (allow-none): A #GCancellable or %NULL.
19950 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
19951 * @user_data: User data to pass to @callback.
19953 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.NewMethodIn2">NewMethodIn2()</link> D-Bus method on @proxy.
19954 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
19955 * You can then call foo_igen_changing_interface_v10_call_new_method_in2_finish() to get the result of the operation.
19957 * See foo_igen_changing_interface_v10_call_new_method_in2_sync() for the synchronous, blocking version of this method.
19962 foo_igen_changing_interface_v10_call_new_method_in2 (
19963 FooiGenChangingInterfaceV10 *proxy,
19964 GCancellable *cancellable,
19965 GAsyncReadyCallback callback,
19966 gpointer user_data)
19968 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
19970 g_variant_new ("()"),
19971 G_DBUS_CALL_FLAGS_NONE,
19979 * foo_igen_changing_interface_v10_call_new_method_in2_finish:
19980 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
19981 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_call_new_method_in2().
19982 * @error: Return location for error or %NULL.
19984 * Finishes an operation started with foo_igen_changing_interface_v10_call_new_method_in2().
19986 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
19991 foo_igen_changing_interface_v10_call_new_method_in2_finish (
19992 FooiGenChangingInterfaceV10 *proxy,
19997 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
20000 g_variant_get (_ret,
20002 g_variant_unref (_ret);
20004 return _ret != NULL;
20008 * foo_igen_changing_interface_v10_call_new_method_in2_sync:
20009 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20010 * @cancellable: (allow-none): A #GCancellable or %NULL.
20011 * @error: Return location for error or %NULL.
20013 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.NewMethodIn2">NewMethodIn2()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
20015 * See foo_igen_changing_interface_v10_call_new_method_in2() for the asynchronous version of this method.
20017 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20022 foo_igen_changing_interface_v10_call_new_method_in2_sync (
20023 FooiGenChangingInterfaceV10 *proxy,
20024 GCancellable *cancellable,
20028 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
20030 g_variant_new ("()"),
20031 G_DBUS_CALL_FLAGS_NONE,
20037 g_variant_get (_ret,
20039 g_variant_unref (_ret);
20041 return _ret != NULL;
20045 * foo_igen_changing_interface_v10_call_baz_method:
20046 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20047 * @cancellable: (allow-none): A #GCancellable or %NULL.
20048 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
20049 * @user_data: User data to pass to @callback.
20051 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.BazMethod">BazMethod()</link> D-Bus method on @proxy.
20052 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
20053 * You can then call foo_igen_changing_interface_v10_call_baz_method_finish() to get the result of the operation.
20055 * See foo_igen_changing_interface_v10_call_baz_method_sync() for the synchronous, blocking version of this method.
20058 foo_igen_changing_interface_v10_call_baz_method (
20059 FooiGenChangingInterfaceV10 *proxy,
20060 GCancellable *cancellable,
20061 GAsyncReadyCallback callback,
20062 gpointer user_data)
20064 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
20066 g_variant_new ("()"),
20067 G_DBUS_CALL_FLAGS_NONE,
20075 * foo_igen_changing_interface_v10_call_baz_method_finish:
20076 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20077 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_call_baz_method().
20078 * @error: Return location for error or %NULL.
20080 * Finishes an operation started with foo_igen_changing_interface_v10_call_baz_method().
20082 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20085 foo_igen_changing_interface_v10_call_baz_method_finish (
20086 FooiGenChangingInterfaceV10 *proxy,
20091 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
20094 g_variant_get (_ret,
20096 g_variant_unref (_ret);
20098 return _ret != NULL;
20102 * foo_igen_changing_interface_v10_call_baz_method_sync:
20103 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20104 * @cancellable: (allow-none): A #GCancellable or %NULL.
20105 * @error: Return location for error or %NULL.
20107 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.BazMethod">BazMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
20109 * See foo_igen_changing_interface_v10_call_baz_method() for the asynchronous version of this method.
20111 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20114 foo_igen_changing_interface_v10_call_baz_method_sync (
20115 FooiGenChangingInterfaceV10 *proxy,
20116 GCancellable *cancellable,
20120 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
20122 g_variant_new ("()"),
20123 G_DBUS_CALL_FLAGS_NONE,
20129 g_variant_get (_ret,
20131 g_variant_unref (_ret);
20133 return _ret != NULL;
20137 * foo_igen_changing_interface_v10_call_bar_method:
20138 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20139 * @cancellable: (allow-none): A #GCancellable or %NULL.
20140 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
20141 * @user_data: User data to pass to @callback.
20143 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.BarMethod">BarMethod()</link> D-Bus method on @proxy.
20144 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
20145 * You can then call foo_igen_changing_interface_v10_call_bar_method_finish() to get the result of the operation.
20147 * See foo_igen_changing_interface_v10_call_bar_method_sync() for the synchronous, blocking version of this method.
20150 foo_igen_changing_interface_v10_call_bar_method (
20151 FooiGenChangingInterfaceV10 *proxy,
20152 GCancellable *cancellable,
20153 GAsyncReadyCallback callback,
20154 gpointer user_data)
20156 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
20158 g_variant_new ("()"),
20159 G_DBUS_CALL_FLAGS_NONE,
20167 * foo_igen_changing_interface_v10_call_bar_method_finish:
20168 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20169 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_call_bar_method().
20170 * @error: Return location for error or %NULL.
20172 * Finishes an operation started with foo_igen_changing_interface_v10_call_bar_method().
20174 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20177 foo_igen_changing_interface_v10_call_bar_method_finish (
20178 FooiGenChangingInterfaceV10 *proxy,
20183 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
20186 g_variant_get (_ret,
20188 g_variant_unref (_ret);
20190 return _ret != NULL;
20194 * foo_igen_changing_interface_v10_call_bar_method_sync:
20195 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20196 * @cancellable: (allow-none): A #GCancellable or %NULL.
20197 * @error: Return location for error or %NULL.
20199 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.BarMethod">BarMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
20201 * See foo_igen_changing_interface_v10_call_bar_method() for the asynchronous version of this method.
20203 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20206 foo_igen_changing_interface_v10_call_bar_method_sync (
20207 FooiGenChangingInterfaceV10 *proxy,
20208 GCancellable *cancellable,
20212 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
20214 g_variant_new ("()"),
20215 G_DBUS_CALL_FLAGS_NONE,
20221 g_variant_get (_ret,
20223 g_variant_unref (_ret);
20225 return _ret != NULL;
20229 * foo_igen_changing_interface_v10_call_foo_method:
20230 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20231 * @cancellable: (allow-none): A #GCancellable or %NULL.
20232 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
20233 * @user_data: User data to pass to @callback.
20235 * Asynchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.FooMethod">FooMethod()</link> D-Bus method on @proxy.
20236 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
20237 * You can then call foo_igen_changing_interface_v10_call_foo_method_finish() to get the result of the operation.
20239 * See foo_igen_changing_interface_v10_call_foo_method_sync() for the synchronous, blocking version of this method.
20242 foo_igen_changing_interface_v10_call_foo_method (
20243 FooiGenChangingInterfaceV10 *proxy,
20244 GCancellable *cancellable,
20245 GAsyncReadyCallback callback,
20246 gpointer user_data)
20248 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
20250 g_variant_new ("()"),
20251 G_DBUS_CALL_FLAGS_NONE,
20259 * foo_igen_changing_interface_v10_call_foo_method_finish:
20260 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20261 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_call_foo_method().
20262 * @error: Return location for error or %NULL.
20264 * Finishes an operation started with foo_igen_changing_interface_v10_call_foo_method().
20266 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20269 foo_igen_changing_interface_v10_call_foo_method_finish (
20270 FooiGenChangingInterfaceV10 *proxy,
20275 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
20278 g_variant_get (_ret,
20280 g_variant_unref (_ret);
20282 return _ret != NULL;
20286 * foo_igen_changing_interface_v10_call_foo_method_sync:
20287 * @proxy: A #FooiGenChangingInterfaceV10Proxy.
20288 * @cancellable: (allow-none): A #GCancellable or %NULL.
20289 * @error: Return location for error or %NULL.
20291 * Synchronously invokes the <link linkend="gdbus-method-ChangingInterfaceV10.FooMethod">FooMethod()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
20293 * See foo_igen_changing_interface_v10_call_foo_method() for the asynchronous version of this method.
20295 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
20298 foo_igen_changing_interface_v10_call_foo_method_sync (
20299 FooiGenChangingInterfaceV10 *proxy,
20300 GCancellable *cancellable,
20304 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
20306 g_variant_new ("()"),
20307 G_DBUS_CALL_FLAGS_NONE,
20313 g_variant_get (_ret,
20315 g_variant_unref (_ret);
20317 return _ret != NULL;
20321 * foo_igen_changing_interface_v10_complete_added_method_in10:
20322 * @object: A #FooiGenChangingInterfaceV10.
20323 * @invocation: (transfer full): A #GDBusMethodInvocation.
20325 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV10.AddedMethodIn10">AddedMethodIn10()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
20327 * This method will free @invocation, you cannot use it afterwards.
20332 foo_igen_changing_interface_v10_complete_added_method_in10 (
20333 FooiGenChangingInterfaceV10 *object,
20334 GDBusMethodInvocation *invocation)
20336 g_dbus_method_invocation_return_value (invocation,
20337 g_variant_new ("()"));
20341 * foo_igen_changing_interface_v10_complete_new_method_in2:
20342 * @object: A #FooiGenChangingInterfaceV10.
20343 * @invocation: (transfer full): A #GDBusMethodInvocation.
20345 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV10.NewMethodIn2">NewMethodIn2()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
20347 * This method will free @invocation, you cannot use it afterwards.
20352 foo_igen_changing_interface_v10_complete_new_method_in2 (
20353 FooiGenChangingInterfaceV10 *object,
20354 GDBusMethodInvocation *invocation)
20356 g_dbus_method_invocation_return_value (invocation,
20357 g_variant_new ("()"));
20361 * foo_igen_changing_interface_v10_complete_baz_method:
20362 * @object: A #FooiGenChangingInterfaceV10.
20363 * @invocation: (transfer full): A #GDBusMethodInvocation.
20365 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV10.BazMethod">BazMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
20367 * This method will free @invocation, you cannot use it afterwards.
20370 foo_igen_changing_interface_v10_complete_baz_method (
20371 FooiGenChangingInterfaceV10 *object,
20372 GDBusMethodInvocation *invocation)
20374 g_dbus_method_invocation_return_value (invocation,
20375 g_variant_new ("()"));
20379 * foo_igen_changing_interface_v10_complete_bar_method:
20380 * @object: A #FooiGenChangingInterfaceV10.
20381 * @invocation: (transfer full): A #GDBusMethodInvocation.
20383 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV10.BarMethod">BarMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
20385 * This method will free @invocation, you cannot use it afterwards.
20388 foo_igen_changing_interface_v10_complete_bar_method (
20389 FooiGenChangingInterfaceV10 *object,
20390 GDBusMethodInvocation *invocation)
20392 g_dbus_method_invocation_return_value (invocation,
20393 g_variant_new ("()"));
20397 * foo_igen_changing_interface_v10_complete_foo_method:
20398 * @object: A #FooiGenChangingInterfaceV10.
20399 * @invocation: (transfer full): A #GDBusMethodInvocation.
20401 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-ChangingInterfaceV10.FooMethod">FooMethod()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
20403 * This method will free @invocation, you cannot use it afterwards.
20406 foo_igen_changing_interface_v10_complete_foo_method (
20407 FooiGenChangingInterfaceV10 *object,
20408 GDBusMethodInvocation *invocation)
20410 g_dbus_method_invocation_return_value (invocation,
20411 g_variant_new ("()"));
20414 /* ------------------------------------------------------------------------ */
20417 * FooiGenChangingInterfaceV10Proxy:
20419 * The #FooiGenChangingInterfaceV10Proxy structure contains only private data and should only be accessed using the provided API.
20425 * FooiGenChangingInterfaceV10ProxyClass:
20426 * @parent_class: The parent class.
20428 * Class structure for #FooiGenChangingInterfaceV10Proxy.
20433 struct _FooiGenChangingInterfaceV10ProxyPrivate
20438 static void foo_igen_changing_interface_v10_proxy_iface_init (FooiGenChangingInterfaceV10Iface *iface);
20440 G_DEFINE_TYPE_WITH_CODE (FooiGenChangingInterfaceV10Proxy, foo_igen_changing_interface_v10_proxy, G_TYPE_DBUS_PROXY,
20441 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10, foo_igen_changing_interface_v10_proxy_iface_init));
20444 foo_igen_changing_interface_v10_proxy_finalize (GObject *object)
20446 FooiGenChangingInterfaceV10Proxy *proxy = FOO_IGEN_CHANGING_INTERFACE_V10_PROXY (object);
20447 g_datalist_clear (&proxy->priv->qdata);
20448 G_OBJECT_CLASS (foo_igen_changing_interface_v10_proxy_parent_class)->finalize (object);
20452 foo_igen_changing_interface_v10_proxy_get_property (GObject *object,
20460 foo_igen_changing_interface_v10_proxy_set_property (GObject *object,
20462 const GValue *value,
20468 foo_igen_changing_interface_v10_proxy_g_signal (GDBusProxy *proxy,
20469 const gchar *sender_name,
20470 const gchar *signal_name,
20471 GVariant *parameters)
20473 _ExtendedGDBusSignalInfo *info;
20480 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v10_interface_info, signal_name);
20483 num_params = g_variant_n_children (parameters);
20484 paramv = g_new0 (GValue, num_params + 1);
20485 g_value_init (¶mv[0], FOO_IGEN_TYPE_CHANGING_INTERFACE_V10);
20486 g_value_set_object (¶mv[0], proxy);
20487 g_variant_iter_init (&iter, parameters);
20489 while ((child = g_variant_iter_next_value (&iter)) != NULL)
20491 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
20492 if (arg_info->use_gvariant)
20494 g_value_init (¶mv[n], G_TYPE_VARIANT);
20495 g_value_set_variant (¶mv[n], child);
20499 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
20500 g_variant_unref (child);
20502 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_CHANGING_INTERFACE_V10);
20503 g_signal_emitv (paramv, signal_id, 0, NULL);
20504 for (n = 0; n < num_params + 1; n++)
20505 g_value_unset (¶mv[n]);
20510 foo_igen_changing_interface_v10_proxy_g_properties_changed (GDBusProxy *_proxy,
20511 GVariant *changed_properties,
20512 const gchar *const *invalidated_properties)
20514 FooiGenChangingInterfaceV10Proxy *proxy = FOO_IGEN_CHANGING_INTERFACE_V10_PROXY (_proxy);
20517 GVariantIter *iter;
20518 _ExtendedGDBusPropertyInfo *info;
20519 g_variant_get (changed_properties, "a{sv}", &iter);
20520 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
20522 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v10_interface_info, key);
20523 g_datalist_remove_data (&proxy->priv->qdata, key);
20525 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
20527 g_variant_iter_free (iter);
20528 for (n = 0; invalidated_properties[n] != NULL; n++)
20530 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v10_interface_info, invalidated_properties[n]);
20531 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
20533 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
20538 foo_igen_changing_interface_v10_proxy_init (FooiGenChangingInterfaceV10Proxy *proxy)
20540 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_PROXY, FooiGenChangingInterfaceV10ProxyPrivate);
20541 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_changing_interface_v10_interface_info ());
20545 foo_igen_changing_interface_v10_proxy_class_init (FooiGenChangingInterfaceV10ProxyClass *klass)
20547 GObjectClass *gobject_class;
20548 GDBusProxyClass *proxy_class;
20550 g_type_class_add_private (klass, sizeof (FooiGenChangingInterfaceV10ProxyPrivate));
20552 gobject_class = G_OBJECT_CLASS (klass);
20553 gobject_class->finalize = foo_igen_changing_interface_v10_proxy_finalize;
20554 gobject_class->get_property = foo_igen_changing_interface_v10_proxy_get_property;
20555 gobject_class->set_property = foo_igen_changing_interface_v10_proxy_set_property;
20557 proxy_class = G_DBUS_PROXY_CLASS (klass);
20558 proxy_class->g_signal = foo_igen_changing_interface_v10_proxy_g_signal;
20559 proxy_class->g_properties_changed = foo_igen_changing_interface_v10_proxy_g_properties_changed;
20564 foo_igen_changing_interface_v10_proxy_iface_init (FooiGenChangingInterfaceV10Iface *iface)
20569 * foo_igen_changing_interface_v10_proxy_new:
20570 * @connection: A #GDBusConnection.
20571 * @flags: Flags from the #GDBusProxyFlags enumeration.
20572 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
20573 * @object_path: An object path.
20574 * @cancellable: (allow-none): A #GCancellable or %NULL.
20575 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20576 * @user_data: User data to pass to @callback.
20578 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link>. See g_dbus_proxy_new() for more details.
20580 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
20581 * You can then call foo_igen_changing_interface_v10_proxy_new_finish() to get the result of the operation.
20583 * See foo_igen_changing_interface_v10_proxy_new_sync() for the synchronous, blocking version of this constructor.
20588 foo_igen_changing_interface_v10_proxy_new (
20589 GDBusConnection *connection,
20590 GDBusProxyFlags flags,
20592 const gchar *object_path,
20593 GCancellable *cancellable,
20594 GAsyncReadyCallback callback,
20595 gpointer user_data)
20597 g_async_initable_new_async (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_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", "ChangingInterfaceV10", NULL);
20601 * foo_igen_changing_interface_v10_proxy_new_finish:
20602 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_proxy_new().
20603 * @error: Return location for error or %NULL
20605 * Finishes an operation started with foo_igen_changing_interface_v10_proxy_new().
20607 * Returns: (transfer full) (type FooiGenChangingInterfaceV10Proxy): The constructed proxy object or %NULL if @error is set.
20611 FooiGenChangingInterfaceV10 *
20612 foo_igen_changing_interface_v10_proxy_new_finish (
20617 GObject *source_object;
20618 source_object = g_async_result_get_source_object (res);
20619 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
20620 g_object_unref (source_object);
20622 return FOO_IGEN_CHANGING_INTERFACE_V10 (ret);
20628 * foo_igen_changing_interface_v10_proxy_new_sync:
20629 * @connection: A #GDBusConnection.
20630 * @flags: Flags from the #GDBusProxyFlags enumeration.
20631 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
20632 * @object_path: An object path.
20633 * @cancellable: (allow-none): A #GCancellable or %NULL.
20634 * @error: Return location for error or %NULL
20636 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link>. See g_dbus_proxy_new_sync() for more details.
20638 * The calling thread is blocked until a reply is received.
20640 * See foo_igen_changing_interface_v10_proxy_new() for the asynchronous version of this constructor.
20642 * Returns: (transfer full) (type FooiGenChangingInterfaceV10Proxy): The constructed proxy object or %NULL if @error is set.
20646 FooiGenChangingInterfaceV10 *
20647 foo_igen_changing_interface_v10_proxy_new_sync (
20648 GDBusConnection *connection,
20649 GDBusProxyFlags flags,
20651 const gchar *object_path,
20652 GCancellable *cancellable,
20656 ret = g_initable_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "ChangingInterfaceV10", NULL);
20658 return FOO_IGEN_CHANGING_INTERFACE_V10 (ret);
20665 * foo_igen_changing_interface_v10_proxy_new_for_bus:
20666 * @bus_type: A #GBusType.
20667 * @flags: Flags from the #GDBusProxyFlags enumeration.
20668 * @name: A bus name (well-known or unique).
20669 * @object_path: An object path.
20670 * @cancellable: (allow-none): A #GCancellable or %NULL.
20671 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20672 * @user_data: User data to pass to @callback.
20674 * Like foo_igen_changing_interface_v10_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
20676 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
20677 * You can then call foo_igen_changing_interface_v10_proxy_new_for_bus_finish() to get the result of the operation.
20679 * See foo_igen_changing_interface_v10_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
20684 foo_igen_changing_interface_v10_proxy_new_for_bus (
20686 GDBusProxyFlags flags,
20688 const gchar *object_path,
20689 GCancellable *cancellable,
20690 GAsyncReadyCallback callback,
20691 gpointer user_data)
20693 g_async_initable_new_async (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_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", "ChangingInterfaceV10", NULL);
20697 * foo_igen_changing_interface_v10_proxy_new_for_bus_finish:
20698 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_changing_interface_v10_proxy_new_for_bus().
20699 * @error: Return location for error or %NULL
20701 * Finishes an operation started with foo_igen_changing_interface_v10_proxy_new_for_bus().
20703 * Returns: (transfer full) (type FooiGenChangingInterfaceV10Proxy): The constructed proxy object or %NULL if @error is set.
20707 FooiGenChangingInterfaceV10 *
20708 foo_igen_changing_interface_v10_proxy_new_for_bus_finish (
20713 GObject *source_object;
20714 source_object = g_async_result_get_source_object (res);
20715 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
20716 g_object_unref (source_object);
20718 return FOO_IGEN_CHANGING_INTERFACE_V10 (ret);
20724 * foo_igen_changing_interface_v10_proxy_new_for_bus_sync:
20725 * @bus_type: A #GBusType.
20726 * @flags: Flags from the #GDBusProxyFlags enumeration.
20727 * @name: A bus name (well-known or unique).
20728 * @object_path: An object path.
20729 * @cancellable: (allow-none): A #GCancellable or %NULL.
20730 * @error: Return location for error or %NULL
20732 * Like foo_igen_changing_interface_v10_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
20734 * The calling thread is blocked until a reply is received.
20736 * See foo_igen_changing_interface_v10_proxy_new_for_bus() for the asynchronous version of this constructor.
20738 * Returns: (transfer full) (type FooiGenChangingInterfaceV10Proxy): The constructed proxy object or %NULL if @error is set.
20742 FooiGenChangingInterfaceV10 *
20743 foo_igen_changing_interface_v10_proxy_new_for_bus_sync (
20745 GDBusProxyFlags flags,
20747 const gchar *object_path,
20748 GCancellable *cancellable,
20752 ret = g_initable_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "ChangingInterfaceV10", NULL);
20754 return FOO_IGEN_CHANGING_INTERFACE_V10 (ret);
20760 /* ------------------------------------------------------------------------ */
20763 * FooiGenChangingInterfaceV10Skeleton:
20765 * The #FooiGenChangingInterfaceV10Skeleton structure contains only private data and should only be accessed using the provided API.
20771 * FooiGenChangingInterfaceV10SkeletonClass:
20772 * @parent_class: The parent class.
20774 * Class structure for #FooiGenChangingInterfaceV10Skeleton.
20779 struct _FooiGenChangingInterfaceV10SkeletonPrivate
20781 GValue *properties;
20782 GList *changed_properties;
20783 GSource *changed_properties_idle_source;
20784 GMainContext *context;
20789 _foo_igen_changing_interface_v10_skeleton_handle_method_call (
20790 GDBusConnection *connection,
20791 const gchar *sender,
20792 const gchar *object_path,
20793 const gchar *interface_name,
20794 const gchar *method_name,
20795 GVariant *parameters,
20796 GDBusMethodInvocation *invocation,
20797 gpointer user_data)
20799 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (user_data);
20800 _ExtendedGDBusMethodInfo *info;
20808 GValue return_value = G_VALUE_INIT;
20809 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
20810 g_assert (info != NULL);
20811 num_params = g_variant_n_children (parameters);
20812 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
20814 g_value_init (¶mv[n], FOO_IGEN_TYPE_CHANGING_INTERFACE_V10);
20815 g_value_set_object (¶mv[n++], skeleton);
20816 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
20817 g_value_set_object (¶mv[n++], invocation);
20818 if (info->pass_fdlist)
20821 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
20822 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
20824 g_assert_not_reached ();
20827 g_variant_iter_init (&iter, parameters);
20828 while ((child = g_variant_iter_next_value (&iter)) != NULL)
20830 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
20831 if (arg_info->use_gvariant)
20833 g_value_init (¶mv[n], G_TYPE_VARIANT);
20834 g_value_set_variant (¶mv[n], child);
20838 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
20839 g_variant_unref (child);
20841 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_CHANGING_INTERFACE_V10);
20842 g_value_init (&return_value, G_TYPE_BOOLEAN);
20843 g_signal_emitv (paramv, signal_id, 0, &return_value);
20844 if (!g_value_get_boolean (&return_value))
20845 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
20846 g_value_unset (&return_value);
20847 for (n = 0; n < num_params + num_extra; n++)
20848 g_value_unset (¶mv[n]);
20853 _foo_igen_changing_interface_v10_skeleton_handle_get_property (
20854 GDBusConnection *connection,
20855 const gchar *sender,
20856 const gchar *object_path,
20857 const gchar *interface_name,
20858 const gchar *property_name,
20860 gpointer user_data)
20862 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (user_data);
20863 GValue value = G_VALUE_INIT;
20865 _ExtendedGDBusPropertyInfo *info;
20868 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v10_interface_info, property_name);
20869 g_assert (info != NULL);
20870 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
20873 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
20877 g_value_init (&value, pspec->value_type);
20878 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
20879 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
20880 g_value_unset (&value);
20886 _foo_igen_changing_interface_v10_skeleton_handle_set_property (
20887 GDBusConnection *connection,
20888 const gchar *sender,
20889 const gchar *object_path,
20890 const gchar *interface_name,
20891 const gchar *property_name,
20894 gpointer user_data)
20896 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (user_data);
20897 GValue value = G_VALUE_INIT;
20899 _ExtendedGDBusPropertyInfo *info;
20902 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_changing_interface_v10_interface_info, property_name);
20903 g_assert (info != NULL);
20904 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
20907 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
20911 if (info->use_gvariant)
20912 g_value_set_variant (&value, variant);
20914 g_dbus_gvariant_to_gvalue (variant, &value);
20915 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
20916 g_value_unset (&value);
20922 static const GDBusInterfaceVTable _foo_igen_changing_interface_v10_skeleton_vtable =
20924 _foo_igen_changing_interface_v10_skeleton_handle_method_call,
20925 _foo_igen_changing_interface_v10_skeleton_handle_get_property,
20926 _foo_igen_changing_interface_v10_skeleton_handle_set_property
20929 static GDBusInterfaceInfo *
20930 foo_igen_changing_interface_v10_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
20932 return foo_igen_changing_interface_v10_interface_info ();
20935 static GDBusInterfaceVTable *
20936 foo_igen_changing_interface_v10_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
20938 return (GDBusInterfaceVTable *) &_foo_igen_changing_interface_v10_skeleton_vtable;
20942 foo_igen_changing_interface_v10_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
20944 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (_skeleton);
20946 GVariantBuilder builder;
20948 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
20949 if (_foo_igen_changing_interface_v10_interface_info.parent_struct.properties == NULL)
20951 for (n = 0; _foo_igen_changing_interface_v10_interface_info.parent_struct.properties[n] != NULL; n++)
20953 GDBusPropertyInfo *info = _foo_igen_changing_interface_v10_interface_info.parent_struct.properties[n];
20954 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
20957 value = _foo_igen_changing_interface_v10_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV10", info->name, NULL, skeleton);
20960 g_variant_take_ref (value);
20961 g_variant_builder_add (&builder, "{sv}", info->name, value);
20962 g_variant_unref (value);
20967 return g_variant_builder_end (&builder);
20971 foo_igen_changing_interface_v10_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
20976 _foo_igen_changing_interface_v10_on_signal_added_signal_in10 (
20977 FooiGenChangingInterfaceV10 *object)
20979 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (object);
20981 GList *connections, *l;
20982 GVariant *signal_variant;
20983 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
20985 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
20986 for (l = connections; l != NULL; l = l->next)
20988 GDBusConnection *connection = l->data;
20989 g_dbus_connection_emit_signal (connection,
20990 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV10", "AddedSignalIn10",
20991 signal_variant, NULL);
20993 g_variant_unref (signal_variant);
20994 g_list_free_full (connections, g_object_unref);
20998 _foo_igen_changing_interface_v10_on_signal_new_signal_in2 (
20999 FooiGenChangingInterfaceV10 *object)
21001 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (object);
21003 GList *connections, *l;
21004 GVariant *signal_variant;
21005 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
21007 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
21008 for (l = connections; l != NULL; l = l->next)
21010 GDBusConnection *connection = l->data;
21011 g_dbus_connection_emit_signal (connection,
21012 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV10", "NewSignalIn2",
21013 signal_variant, NULL);
21015 g_variant_unref (signal_variant);
21016 g_list_free_full (connections, g_object_unref);
21020 _foo_igen_changing_interface_v10_on_signal_baz_signal (
21021 FooiGenChangingInterfaceV10 *object)
21023 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (object);
21025 GList *connections, *l;
21026 GVariant *signal_variant;
21027 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
21029 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
21030 for (l = connections; l != NULL; l = l->next)
21032 GDBusConnection *connection = l->data;
21033 g_dbus_connection_emit_signal (connection,
21034 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV10", "BazSignal",
21035 signal_variant, NULL);
21037 g_variant_unref (signal_variant);
21038 g_list_free_full (connections, g_object_unref);
21042 _foo_igen_changing_interface_v10_on_signal_bar_signal (
21043 FooiGenChangingInterfaceV10 *object)
21045 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (object);
21047 GList *connections, *l;
21048 GVariant *signal_variant;
21049 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
21051 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
21052 for (l = connections; l != NULL; l = l->next)
21054 GDBusConnection *connection = l->data;
21055 g_dbus_connection_emit_signal (connection,
21056 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV10", "BarSignal",
21057 signal_variant, NULL);
21059 g_variant_unref (signal_variant);
21060 g_list_free_full (connections, g_object_unref);
21064 _foo_igen_changing_interface_v10_on_signal_foo_signal (
21065 FooiGenChangingInterfaceV10 *object)
21067 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (object);
21069 GList *connections, *l;
21070 GVariant *signal_variant;
21071 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
21073 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
21074 for (l = connections; l != NULL; l = l->next)
21076 GDBusConnection *connection = l->data;
21077 g_dbus_connection_emit_signal (connection,
21078 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "ChangingInterfaceV10", "FooSignal",
21079 signal_variant, NULL);
21081 g_variant_unref (signal_variant);
21082 g_list_free_full (connections, g_object_unref);
21085 static void foo_igen_changing_interface_v10_skeleton_iface_init (FooiGenChangingInterfaceV10Iface *iface);
21086 G_DEFINE_TYPE_WITH_CODE (FooiGenChangingInterfaceV10Skeleton, foo_igen_changing_interface_v10_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
21087 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10, foo_igen_changing_interface_v10_skeleton_iface_init));
21090 foo_igen_changing_interface_v10_skeleton_finalize (GObject *object)
21092 FooiGenChangingInterfaceV10Skeleton *skeleton = FOO_IGEN_CHANGING_INTERFACE_V10_SKELETON (object);
21093 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
21094 if (skeleton->priv->changed_properties_idle_source != NULL)
21095 g_source_destroy (skeleton->priv->changed_properties_idle_source);
21096 g_main_context_unref (skeleton->priv->context);
21097 g_mutex_clear (&skeleton->priv->lock);
21098 G_OBJECT_CLASS (foo_igen_changing_interface_v10_skeleton_parent_class)->finalize (object);
21102 foo_igen_changing_interface_v10_skeleton_init (FooiGenChangingInterfaceV10Skeleton *skeleton)
21104 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_SKELETON, FooiGenChangingInterfaceV10SkeletonPrivate);
21105 g_mutex_init (&skeleton->priv->lock);
21106 skeleton->priv->context = g_main_context_ref_thread_default ();
21110 foo_igen_changing_interface_v10_skeleton_class_init (FooiGenChangingInterfaceV10SkeletonClass *klass)
21112 GObjectClass *gobject_class;
21113 GDBusInterfaceSkeletonClass *skeleton_class;
21115 g_type_class_add_private (klass, sizeof (FooiGenChangingInterfaceV10SkeletonPrivate));
21117 gobject_class = G_OBJECT_CLASS (klass);
21118 gobject_class->finalize = foo_igen_changing_interface_v10_skeleton_finalize;
21120 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
21121 skeleton_class->get_info = foo_igen_changing_interface_v10_skeleton_dbus_interface_get_info;
21122 skeleton_class->get_properties = foo_igen_changing_interface_v10_skeleton_dbus_interface_get_properties;
21123 skeleton_class->flush = foo_igen_changing_interface_v10_skeleton_dbus_interface_flush;
21124 skeleton_class->get_vtable = foo_igen_changing_interface_v10_skeleton_dbus_interface_get_vtable;
21128 foo_igen_changing_interface_v10_skeleton_iface_init (FooiGenChangingInterfaceV10Iface *iface)
21130 iface->added_signal_in10 = _foo_igen_changing_interface_v10_on_signal_added_signal_in10;
21131 iface->new_signal_in2 = _foo_igen_changing_interface_v10_on_signal_new_signal_in2;
21132 iface->baz_signal = _foo_igen_changing_interface_v10_on_signal_baz_signal;
21133 iface->bar_signal = _foo_igen_changing_interface_v10_on_signal_bar_signal;
21134 iface->foo_signal = _foo_igen_changing_interface_v10_on_signal_foo_signal;
21138 * foo_igen_changing_interface_v10_skeleton_new:
21140 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link>.
21142 * Returns: (transfer full) (type FooiGenChangingInterfaceV10Skeleton): The skeleton object.
21146 FooiGenChangingInterfaceV10 *
21147 foo_igen_changing_interface_v10_skeleton_new (void)
21149 return FOO_IGEN_CHANGING_INTERFACE_V10 (g_object_new (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_SKELETON, NULL));
21152 /* ------------------------------------------------------------------------
21153 * Code for interface TestUglyCaseInterface
21154 * ------------------------------------------------------------------------
21158 * SECTION:FooiGenTesTuglyCASEInterface
21159 * @title: FooiGenTesTuglyCASEInterface
21160 * @short_description: Generated C code for the TestUglyCaseInterface D-Bus interface
21162 * This section contains code for working with the <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link> D-Bus interface in C.
21165 /* ---- Introspection data for TestUglyCaseInterface ---- */
21167 static const _ExtendedGDBusMethodInfo _foo_igen_test_ugly_case_interface_method_info_get_iscsi_servers =
21176 "handle-get-iscsi-servers",
21180 static const _ExtendedGDBusMethodInfo * const _foo_igen_test_ugly_case_interface_method_info_pointers[] =
21182 &_foo_igen_test_ugly_case_interface_method_info_get_iscsi_servers,
21186 static const _ExtendedGDBusSignalInfo _foo_igen_test_ugly_case_interface_signal_info_servers_updated_now =
21190 "serversUPDATEDNOW",
21194 "servers-updated-now"
21197 static const _ExtendedGDBusSignalInfo * const _foo_igen_test_ugly_case_interface_signal_info_pointers[] =
21199 &_foo_igen_test_ugly_case_interface_signal_info_servers_updated_now,
21203 static const _ExtendedGDBusPropertyInfo _foo_igen_test_ugly_case_interface_property_info_ugly_name =
21209 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
21216 static const _ExtendedGDBusPropertyInfo * const _foo_igen_test_ugly_case_interface_property_info_pointers[] =
21218 &_foo_igen_test_ugly_case_interface_property_info_ugly_name,
21222 static const _ExtendedGDBusInterfaceInfo _foo_igen_test_ugly_case_interface_interface_info =
21226 "TestUglyCaseInterface",
21227 (GDBusMethodInfo **) &_foo_igen_test_ugly_case_interface_method_info_pointers,
21228 (GDBusSignalInfo **) &_foo_igen_test_ugly_case_interface_signal_info_pointers,
21229 (GDBusPropertyInfo **) &_foo_igen_test_ugly_case_interface_property_info_pointers,
21232 "test-ugly-case-interface",
21237 * foo_igen_test_ugly_case_interface_interface_info:
21239 * Gets a machine-readable description of the <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link> D-Bus interface.
21241 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
21243 GDBusInterfaceInfo *
21244 foo_igen_test_ugly_case_interface_interface_info (void)
21246 return (GDBusInterfaceInfo *) &_foo_igen_test_ugly_case_interface_interface_info;
21250 * foo_igen_test_ugly_case_interface_override_properties:
21251 * @klass: The class structure for a #GObject<!-- -->-derived class.
21252 * @property_id_begin: The property id to assign to the first overridden property.
21254 * Overrides all #GObject properties in the #FooiGenTesTuglyCASEInterface interface for a concrete class.
21255 * The properties are overridden in the order they are defined.
21257 * Returns: The last property id.
21260 foo_igen_test_ugly_case_interface_override_properties (GObjectClass *klass, guint property_id_begin)
21262 g_object_class_override_property (klass, property_id_begin++, "ugly-name");
21263 return property_id_begin - 1;
21269 * FooiGenTesTuglyCASEInterface:
21271 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link>.
21275 * FooiGenTesTuglyCASEInterfaceIface:
21276 * @parent_iface: The parent interface.
21277 * @handle_get_iscsi_servers: Handler for the #FooiGenTesTuglyCASEInterface::handle-get-iscsi-servers signal.
21278 * @get_ugly_name: Getter for the #FooiGenTesTuglyCASEInterface:ugly-name property.
21279 * @servers_updated_now: Handler for the #FooiGenTesTuglyCASEInterface::servers-updated-now signal.
21281 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link>.
21285 foo_igen_test_ugly_case_interface_default_init (FooiGenTesTuglyCASEInterfaceIface *iface)
21287 /* GObject signals for incoming D-Bus method calls: */
21289 * FooiGenTesTuglyCASEInterface::handle-get-iscsi-servers:
21290 * @object: A #FooiGenTesTuglyCASEInterface.
21291 * @invocation: A #GDBusMethodInvocation.
21293 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-TestUglyCaseInterface.GetiSCSIServers">GetiSCSIServers()</link> D-Bus method.
21295 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_test_ugly_case_interface_complete_get_iscsi_servers() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
21297 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
21299 g_signal_new ("handle-get-iscsi-servers",
21300 G_TYPE_FROM_INTERFACE (iface),
21302 G_STRUCT_OFFSET (FooiGenTesTuglyCASEInterfaceIface, handle_get_iscsi_servers),
21303 g_signal_accumulator_true_handled,
21305 g_cclosure_marshal_generic,
21308 G_TYPE_DBUS_METHOD_INVOCATION);
21310 /* GObject signals for received D-Bus signals: */
21312 * FooiGenTesTuglyCASEInterface::servers-updated-now:
21313 * @object: A #FooiGenTesTuglyCASEInterface.
21315 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-TestUglyCaseInterface.serversUPDATEDNOW">"serversUPDATEDNOW"</link> is received.
21317 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
21319 g_signal_new ("servers-updated-now",
21320 G_TYPE_FROM_INTERFACE (iface),
21322 G_STRUCT_OFFSET (FooiGenTesTuglyCASEInterfaceIface, servers_updated_now),
21325 g_cclosure_marshal_generic,
21329 /* GObject properties for D-Bus properties: */
21331 * FooiGenTesTuglyCASEInterface:ugly-name:
21333 * Represents the D-Bus property <link linkend="gdbus-property-TestUglyCaseInterface.UGLYNAME">"UGLYNAME"</link>.
21335 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
21337 g_object_interface_install_property (iface,
21338 g_param_spec_int ("ugly-name", "UGLYNAME", "UGLYNAME", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
21341 typedef FooiGenTesTuglyCASEInterfaceIface FooiGenTesTuglyCASEInterfaceInterface;
21342 G_DEFINE_INTERFACE (FooiGenTesTuglyCASEInterface, foo_igen_test_ugly_case_interface, G_TYPE_OBJECT);
21345 * foo_igen_test_ugly_case_interface_get_ugly_name: (skip)
21346 * @object: A #FooiGenTesTuglyCASEInterface.
21348 * Gets the value of the <link linkend="gdbus-property-TestUglyCaseInterface.UGLYNAME">"UGLYNAME"</link> D-Bus property.
21350 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
21352 * Returns: The property value.
21355 foo_igen_test_ugly_case_interface_get_ugly_name (FooiGenTesTuglyCASEInterface *object)
21357 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE_GET_IFACE (object)->get_ugly_name (object);
21361 * foo_igen_test_ugly_case_interface_set_ugly_name: (skip)
21362 * @object: A #FooiGenTesTuglyCASEInterface.
21363 * @value: The value to set.
21365 * Sets the <link linkend="gdbus-property-TestUglyCaseInterface.UGLYNAME">"UGLYNAME"</link> D-Bus property to @value.
21367 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
21370 foo_igen_test_ugly_case_interface_set_ugly_name (FooiGenTesTuglyCASEInterface *object, gint value)
21372 g_object_set (G_OBJECT (object), "ugly-name", value, NULL);
21376 * foo_igen_test_ugly_case_interface_emit_servers_updated_now:
21377 * @object: A #FooiGenTesTuglyCASEInterface.
21379 * Emits the <link linkend="gdbus-signal-TestUglyCaseInterface.serversUPDATEDNOW">"serversUPDATEDNOW"</link> D-Bus signal.
21382 foo_igen_test_ugly_case_interface_emit_servers_updated_now (
21383 FooiGenTesTuglyCASEInterface *object)
21385 g_signal_emit_by_name (object, "servers-updated-now");
21389 * foo_igen_test_ugly_case_interface_call_get_iscsi_servers:
21390 * @proxy: A #FooiGenTesTuglyCASEInterfaceProxy.
21391 * @cancellable: (allow-none): A #GCancellable or %NULL.
21392 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
21393 * @user_data: User data to pass to @callback.
21395 * Asynchronously invokes the <link linkend="gdbus-method-TestUglyCaseInterface.GetiSCSIServers">GetiSCSIServers()</link> D-Bus method on @proxy.
21396 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
21397 * You can then call foo_igen_test_ugly_case_interface_call_get_iscsi_servers_finish() to get the result of the operation.
21399 * See foo_igen_test_ugly_case_interface_call_get_iscsi_servers_sync() for the synchronous, blocking version of this method.
21402 foo_igen_test_ugly_case_interface_call_get_iscsi_servers (
21403 FooiGenTesTuglyCASEInterface *proxy,
21404 GCancellable *cancellable,
21405 GAsyncReadyCallback callback,
21406 gpointer user_data)
21408 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
21410 g_variant_new ("()"),
21411 G_DBUS_CALL_FLAGS_NONE,
21419 * foo_igen_test_ugly_case_interface_call_get_iscsi_servers_finish:
21420 * @proxy: A #FooiGenTesTuglyCASEInterfaceProxy.
21421 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_test_ugly_case_interface_call_get_iscsi_servers().
21422 * @error: Return location for error or %NULL.
21424 * Finishes an operation started with foo_igen_test_ugly_case_interface_call_get_iscsi_servers().
21426 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
21429 foo_igen_test_ugly_case_interface_call_get_iscsi_servers_finish (
21430 FooiGenTesTuglyCASEInterface *proxy,
21435 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
21438 g_variant_get (_ret,
21440 g_variant_unref (_ret);
21442 return _ret != NULL;
21446 * foo_igen_test_ugly_case_interface_call_get_iscsi_servers_sync:
21447 * @proxy: A #FooiGenTesTuglyCASEInterfaceProxy.
21448 * @cancellable: (allow-none): A #GCancellable or %NULL.
21449 * @error: Return location for error or %NULL.
21451 * Synchronously invokes the <link linkend="gdbus-method-TestUglyCaseInterface.GetiSCSIServers">GetiSCSIServers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
21453 * See foo_igen_test_ugly_case_interface_call_get_iscsi_servers() for the asynchronous version of this method.
21455 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
21458 foo_igen_test_ugly_case_interface_call_get_iscsi_servers_sync (
21459 FooiGenTesTuglyCASEInterface *proxy,
21460 GCancellable *cancellable,
21464 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
21466 g_variant_new ("()"),
21467 G_DBUS_CALL_FLAGS_NONE,
21473 g_variant_get (_ret,
21475 g_variant_unref (_ret);
21477 return _ret != NULL;
21481 * foo_igen_test_ugly_case_interface_complete_get_iscsi_servers:
21482 * @object: A #FooiGenTesTuglyCASEInterface.
21483 * @invocation: (transfer full): A #GDBusMethodInvocation.
21485 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-TestUglyCaseInterface.GetiSCSIServers">GetiSCSIServers()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
21487 * This method will free @invocation, you cannot use it afterwards.
21490 foo_igen_test_ugly_case_interface_complete_get_iscsi_servers (
21491 FooiGenTesTuglyCASEInterface *object,
21492 GDBusMethodInvocation *invocation)
21494 g_dbus_method_invocation_return_value (invocation,
21495 g_variant_new ("()"));
21498 /* ------------------------------------------------------------------------ */
21501 * FooiGenTesTuglyCASEInterfaceProxy:
21503 * The #FooiGenTesTuglyCASEInterfaceProxy structure contains only private data and should only be accessed using the provided API.
21507 * FooiGenTesTuglyCASEInterfaceProxyClass:
21508 * @parent_class: The parent class.
21510 * Class structure for #FooiGenTesTuglyCASEInterfaceProxy.
21513 struct _FooiGenTesTuglyCASEInterfaceProxyPrivate
21518 static void foo_igen_test_ugly_case_interface_proxy_iface_init (FooiGenTesTuglyCASEInterfaceIface *iface);
21520 G_DEFINE_TYPE_WITH_CODE (FooiGenTesTuglyCASEInterfaceProxy, foo_igen_test_ugly_case_interface_proxy, G_TYPE_DBUS_PROXY,
21521 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE, foo_igen_test_ugly_case_interface_proxy_iface_init));
21524 foo_igen_test_ugly_case_interface_proxy_finalize (GObject *object)
21526 FooiGenTesTuglyCASEInterfaceProxy *proxy = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_PROXY (object);
21527 g_datalist_clear (&proxy->priv->qdata);
21528 G_OBJECT_CLASS (foo_igen_test_ugly_case_interface_proxy_parent_class)->finalize (object);
21532 foo_igen_test_ugly_case_interface_proxy_get_property (GObject *object,
21537 const _ExtendedGDBusPropertyInfo *info;
21539 g_assert (prop_id != 0 && prop_id - 1 < 1);
21540 info = _foo_igen_test_ugly_case_interface_property_info_pointers[prop_id - 1];
21541 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
21542 if (info->use_gvariant)
21544 g_value_set_variant (value, variant);
21548 if (variant != NULL)
21549 g_dbus_gvariant_to_gvalue (variant, value);
21551 if (variant != NULL)
21552 g_variant_unref (variant);
21556 foo_igen_test_ugly_case_interface_proxy_set_property_cb (GDBusProxy *proxy,
21558 gpointer user_data)
21560 const _ExtendedGDBusPropertyInfo *info = user_data;
21563 if (!g_dbus_proxy_call_finish (proxy, res, &error))
21565 g_warning ("Error setting property `%s' on interface TestUglyCaseInterface: %s (%s, %d)",
21566 info->parent_struct.name,
21567 error->message, g_quark_to_string (error->domain), error->code);
21568 g_error_free (error);
21573 foo_igen_test_ugly_case_interface_proxy_set_property (GObject *object,
21575 const GValue *value,
21578 const _ExtendedGDBusPropertyInfo *info;
21580 g_assert (prop_id != 0 && prop_id - 1 < 1);
21581 info = _foo_igen_test_ugly_case_interface_property_info_pointers[prop_id - 1];
21582 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
21583 g_dbus_proxy_call (G_DBUS_PROXY (object),
21584 "org.freedesktop.DBus.Properties.Set",
21585 g_variant_new ("(ssv)", "TestUglyCaseInterface", info->parent_struct.name, variant),
21586 G_DBUS_CALL_FLAGS_NONE,
21588 NULL, (GAsyncReadyCallback) foo_igen_test_ugly_case_interface_proxy_set_property_cb, (gpointer) info);
21589 g_variant_unref (variant);
21593 foo_igen_test_ugly_case_interface_proxy_g_signal (GDBusProxy *proxy,
21594 const gchar *sender_name,
21595 const gchar *signal_name,
21596 GVariant *parameters)
21598 _ExtendedGDBusSignalInfo *info;
21605 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_test_ugly_case_interface_interface_info, signal_name);
21608 num_params = g_variant_n_children (parameters);
21609 paramv = g_new0 (GValue, num_params + 1);
21610 g_value_init (¶mv[0], FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE);
21611 g_value_set_object (¶mv[0], proxy);
21612 g_variant_iter_init (&iter, parameters);
21614 while ((child = g_variant_iter_next_value (&iter)) != NULL)
21616 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
21617 if (arg_info->use_gvariant)
21619 g_value_init (¶mv[n], G_TYPE_VARIANT);
21620 g_value_set_variant (¶mv[n], child);
21624 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
21625 g_variant_unref (child);
21627 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE);
21628 g_signal_emitv (paramv, signal_id, 0, NULL);
21629 for (n = 0; n < num_params + 1; n++)
21630 g_value_unset (¶mv[n]);
21635 foo_igen_test_ugly_case_interface_proxy_g_properties_changed (GDBusProxy *_proxy,
21636 GVariant *changed_properties,
21637 const gchar *const *invalidated_properties)
21639 FooiGenTesTuglyCASEInterfaceProxy *proxy = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_PROXY (_proxy);
21642 GVariantIter *iter;
21643 _ExtendedGDBusPropertyInfo *info;
21644 g_variant_get (changed_properties, "a{sv}", &iter);
21645 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
21647 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_test_ugly_case_interface_interface_info, key);
21648 g_datalist_remove_data (&proxy->priv->qdata, key);
21650 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
21652 g_variant_iter_free (iter);
21653 for (n = 0; invalidated_properties[n] != NULL; n++)
21655 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_test_ugly_case_interface_interface_info, invalidated_properties[n]);
21656 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
21658 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
21663 foo_igen_test_ugly_case_interface_proxy_get_ugly_name (FooiGenTesTuglyCASEInterface *object)
21665 FooiGenTesTuglyCASEInterfaceProxy *proxy = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_PROXY (object);
21668 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "UGLYNAME");
21669 if (variant != NULL)
21671 value = g_variant_get_int32 (variant);
21672 g_variant_unref (variant);
21678 foo_igen_test_ugly_case_interface_proxy_init (FooiGenTesTuglyCASEInterfaceProxy *proxy)
21680 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_PROXY, FooiGenTesTuglyCASEInterfaceProxyPrivate);
21681 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_test_ugly_case_interface_interface_info ());
21685 foo_igen_test_ugly_case_interface_proxy_class_init (FooiGenTesTuglyCASEInterfaceProxyClass *klass)
21687 GObjectClass *gobject_class;
21688 GDBusProxyClass *proxy_class;
21690 g_type_class_add_private (klass, sizeof (FooiGenTesTuglyCASEInterfaceProxyPrivate));
21692 gobject_class = G_OBJECT_CLASS (klass);
21693 gobject_class->finalize = foo_igen_test_ugly_case_interface_proxy_finalize;
21694 gobject_class->get_property = foo_igen_test_ugly_case_interface_proxy_get_property;
21695 gobject_class->set_property = foo_igen_test_ugly_case_interface_proxy_set_property;
21697 proxy_class = G_DBUS_PROXY_CLASS (klass);
21698 proxy_class->g_signal = foo_igen_test_ugly_case_interface_proxy_g_signal;
21699 proxy_class->g_properties_changed = foo_igen_test_ugly_case_interface_proxy_g_properties_changed;
21702 foo_igen_test_ugly_case_interface_override_properties (gobject_class, 1);
21706 foo_igen_test_ugly_case_interface_proxy_iface_init (FooiGenTesTuglyCASEInterfaceIface *iface)
21708 iface->get_ugly_name = foo_igen_test_ugly_case_interface_proxy_get_ugly_name;
21712 * foo_igen_test_ugly_case_interface_proxy_new:
21713 * @connection: A #GDBusConnection.
21714 * @flags: Flags from the #GDBusProxyFlags enumeration.
21715 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
21716 * @object_path: An object path.
21717 * @cancellable: (allow-none): A #GCancellable or %NULL.
21718 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
21719 * @user_data: User data to pass to @callback.
21721 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link>. See g_dbus_proxy_new() for more details.
21723 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
21724 * You can then call foo_igen_test_ugly_case_interface_proxy_new_finish() to get the result of the operation.
21726 * See foo_igen_test_ugly_case_interface_proxy_new_sync() for the synchronous, blocking version of this constructor.
21729 foo_igen_test_ugly_case_interface_proxy_new (
21730 GDBusConnection *connection,
21731 GDBusProxyFlags flags,
21733 const gchar *object_path,
21734 GCancellable *cancellable,
21735 GAsyncReadyCallback callback,
21736 gpointer user_data)
21738 g_async_initable_new_async (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_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", "TestUglyCaseInterface", NULL);
21742 * foo_igen_test_ugly_case_interface_proxy_new_finish:
21743 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_test_ugly_case_interface_proxy_new().
21744 * @error: Return location for error or %NULL
21746 * Finishes an operation started with foo_igen_test_ugly_case_interface_proxy_new().
21748 * Returns: (transfer full) (type FooiGenTesTuglyCASEInterfaceProxy): The constructed proxy object or %NULL if @error is set.
21750 FooiGenTesTuglyCASEInterface *
21751 foo_igen_test_ugly_case_interface_proxy_new_finish (
21756 GObject *source_object;
21757 source_object = g_async_result_get_source_object (res);
21758 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
21759 g_object_unref (source_object);
21761 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (ret);
21767 * foo_igen_test_ugly_case_interface_proxy_new_sync:
21768 * @connection: A #GDBusConnection.
21769 * @flags: Flags from the #GDBusProxyFlags enumeration.
21770 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
21771 * @object_path: An object path.
21772 * @cancellable: (allow-none): A #GCancellable or %NULL.
21773 * @error: Return location for error or %NULL
21775 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link>. See g_dbus_proxy_new_sync() for more details.
21777 * The calling thread is blocked until a reply is received.
21779 * See foo_igen_test_ugly_case_interface_proxy_new() for the asynchronous version of this constructor.
21781 * Returns: (transfer full) (type FooiGenTesTuglyCASEInterfaceProxy): The constructed proxy object or %NULL if @error is set.
21783 FooiGenTesTuglyCASEInterface *
21784 foo_igen_test_ugly_case_interface_proxy_new_sync (
21785 GDBusConnection *connection,
21786 GDBusProxyFlags flags,
21788 const gchar *object_path,
21789 GCancellable *cancellable,
21793 ret = g_initable_new (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "TestUglyCaseInterface", NULL);
21795 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (ret);
21802 * foo_igen_test_ugly_case_interface_proxy_new_for_bus:
21803 * @bus_type: A #GBusType.
21804 * @flags: Flags from the #GDBusProxyFlags enumeration.
21805 * @name: A bus name (well-known or unique).
21806 * @object_path: An object path.
21807 * @cancellable: (allow-none): A #GCancellable or %NULL.
21808 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
21809 * @user_data: User data to pass to @callback.
21811 * Like foo_igen_test_ugly_case_interface_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
21813 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
21814 * You can then call foo_igen_test_ugly_case_interface_proxy_new_for_bus_finish() to get the result of the operation.
21816 * See foo_igen_test_ugly_case_interface_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
21819 foo_igen_test_ugly_case_interface_proxy_new_for_bus (
21821 GDBusProxyFlags flags,
21823 const gchar *object_path,
21824 GCancellable *cancellable,
21825 GAsyncReadyCallback callback,
21826 gpointer user_data)
21828 g_async_initable_new_async (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_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", "TestUglyCaseInterface", NULL);
21832 * foo_igen_test_ugly_case_interface_proxy_new_for_bus_finish:
21833 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_test_ugly_case_interface_proxy_new_for_bus().
21834 * @error: Return location for error or %NULL
21836 * Finishes an operation started with foo_igen_test_ugly_case_interface_proxy_new_for_bus().
21838 * Returns: (transfer full) (type FooiGenTesTuglyCASEInterfaceProxy): The constructed proxy object or %NULL if @error is set.
21840 FooiGenTesTuglyCASEInterface *
21841 foo_igen_test_ugly_case_interface_proxy_new_for_bus_finish (
21846 GObject *source_object;
21847 source_object = g_async_result_get_source_object (res);
21848 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
21849 g_object_unref (source_object);
21851 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (ret);
21857 * foo_igen_test_ugly_case_interface_proxy_new_for_bus_sync:
21858 * @bus_type: A #GBusType.
21859 * @flags: Flags from the #GDBusProxyFlags enumeration.
21860 * @name: A bus name (well-known or unique).
21861 * @object_path: An object path.
21862 * @cancellable: (allow-none): A #GCancellable or %NULL.
21863 * @error: Return location for error or %NULL
21865 * Like foo_igen_test_ugly_case_interface_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
21867 * The calling thread is blocked until a reply is received.
21869 * See foo_igen_test_ugly_case_interface_proxy_new_for_bus() for the asynchronous version of this constructor.
21871 * Returns: (transfer full) (type FooiGenTesTuglyCASEInterfaceProxy): The constructed proxy object or %NULL if @error is set.
21873 FooiGenTesTuglyCASEInterface *
21874 foo_igen_test_ugly_case_interface_proxy_new_for_bus_sync (
21876 GDBusProxyFlags flags,
21878 const gchar *object_path,
21879 GCancellable *cancellable,
21883 ret = g_initable_new (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "TestUglyCaseInterface", NULL);
21885 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (ret);
21891 /* ------------------------------------------------------------------------ */
21894 * FooiGenTesTuglyCASEInterfaceSkeleton:
21896 * The #FooiGenTesTuglyCASEInterfaceSkeleton structure contains only private data and should only be accessed using the provided API.
21900 * FooiGenTesTuglyCASEInterfaceSkeletonClass:
21901 * @parent_class: The parent class.
21903 * Class structure for #FooiGenTesTuglyCASEInterfaceSkeleton.
21906 struct _FooiGenTesTuglyCASEInterfaceSkeletonPrivate
21908 GValue *properties;
21909 GList *changed_properties;
21910 GSource *changed_properties_idle_source;
21911 GMainContext *context;
21916 _foo_igen_test_ugly_case_interface_skeleton_handle_method_call (
21917 GDBusConnection *connection,
21918 const gchar *sender,
21919 const gchar *object_path,
21920 const gchar *interface_name,
21921 const gchar *method_name,
21922 GVariant *parameters,
21923 GDBusMethodInvocation *invocation,
21924 gpointer user_data)
21926 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (user_data);
21927 _ExtendedGDBusMethodInfo *info;
21935 GValue return_value = G_VALUE_INIT;
21936 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
21937 g_assert (info != NULL);
21938 num_params = g_variant_n_children (parameters);
21939 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
21941 g_value_init (¶mv[n], FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE);
21942 g_value_set_object (¶mv[n++], skeleton);
21943 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
21944 g_value_set_object (¶mv[n++], invocation);
21945 if (info->pass_fdlist)
21948 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
21949 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
21951 g_assert_not_reached ();
21954 g_variant_iter_init (&iter, parameters);
21955 while ((child = g_variant_iter_next_value (&iter)) != NULL)
21957 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
21958 if (arg_info->use_gvariant)
21960 g_value_init (¶mv[n], G_TYPE_VARIANT);
21961 g_value_set_variant (¶mv[n], child);
21965 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
21966 g_variant_unref (child);
21968 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE);
21969 g_value_init (&return_value, G_TYPE_BOOLEAN);
21970 g_signal_emitv (paramv, signal_id, 0, &return_value);
21971 if (!g_value_get_boolean (&return_value))
21972 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
21973 g_value_unset (&return_value);
21974 for (n = 0; n < num_params + num_extra; n++)
21975 g_value_unset (¶mv[n]);
21980 _foo_igen_test_ugly_case_interface_skeleton_handle_get_property (
21981 GDBusConnection *connection,
21982 const gchar *sender,
21983 const gchar *object_path,
21984 const gchar *interface_name,
21985 const gchar *property_name,
21987 gpointer user_data)
21989 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (user_data);
21990 GValue value = G_VALUE_INIT;
21992 _ExtendedGDBusPropertyInfo *info;
21995 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_test_ugly_case_interface_interface_info, property_name);
21996 g_assert (info != NULL);
21997 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
22000 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
22004 g_value_init (&value, pspec->value_type);
22005 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
22006 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
22007 g_value_unset (&value);
22013 _foo_igen_test_ugly_case_interface_skeleton_handle_set_property (
22014 GDBusConnection *connection,
22015 const gchar *sender,
22016 const gchar *object_path,
22017 const gchar *interface_name,
22018 const gchar *property_name,
22021 gpointer user_data)
22023 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (user_data);
22024 GValue value = G_VALUE_INIT;
22026 _ExtendedGDBusPropertyInfo *info;
22029 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_test_ugly_case_interface_interface_info, property_name);
22030 g_assert (info != NULL);
22031 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
22034 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
22038 if (info->use_gvariant)
22039 g_value_set_variant (&value, variant);
22041 g_dbus_gvariant_to_gvalue (variant, &value);
22042 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
22043 g_value_unset (&value);
22049 static const GDBusInterfaceVTable _foo_igen_test_ugly_case_interface_skeleton_vtable =
22051 _foo_igen_test_ugly_case_interface_skeleton_handle_method_call,
22052 _foo_igen_test_ugly_case_interface_skeleton_handle_get_property,
22053 _foo_igen_test_ugly_case_interface_skeleton_handle_set_property
22056 static GDBusInterfaceInfo *
22057 foo_igen_test_ugly_case_interface_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
22059 return foo_igen_test_ugly_case_interface_interface_info ();
22062 static GDBusInterfaceVTable *
22063 foo_igen_test_ugly_case_interface_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
22065 return (GDBusInterfaceVTable *) &_foo_igen_test_ugly_case_interface_skeleton_vtable;
22069 foo_igen_test_ugly_case_interface_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
22071 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (_skeleton);
22073 GVariantBuilder builder;
22075 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
22076 if (_foo_igen_test_ugly_case_interface_interface_info.parent_struct.properties == NULL)
22078 for (n = 0; _foo_igen_test_ugly_case_interface_interface_info.parent_struct.properties[n] != NULL; n++)
22080 GDBusPropertyInfo *info = _foo_igen_test_ugly_case_interface_interface_info.parent_struct.properties[n];
22081 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
22084 value = _foo_igen_test_ugly_case_interface_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "TestUglyCaseInterface", info->name, NULL, skeleton);
22087 g_variant_take_ref (value);
22088 g_variant_builder_add (&builder, "{sv}", info->name, value);
22089 g_variant_unref (value);
22094 return g_variant_builder_end (&builder);
22097 static gboolean _foo_igen_test_ugly_case_interface_emit_changed (gpointer user_data);
22100 foo_igen_test_ugly_case_interface_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
22102 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (_skeleton);
22103 gboolean emit_changed = FALSE;
22105 g_mutex_lock (&skeleton->priv->lock);
22106 if (skeleton->priv->changed_properties_idle_source != NULL)
22108 g_source_destroy (skeleton->priv->changed_properties_idle_source);
22109 skeleton->priv->changed_properties_idle_source = NULL;
22110 emit_changed = TRUE;
22112 g_mutex_unlock (&skeleton->priv->lock);
22115 _foo_igen_test_ugly_case_interface_emit_changed (skeleton);
22119 _foo_igen_test_ugly_case_interface_on_signal_servers_updated_now (
22120 FooiGenTesTuglyCASEInterface *object)
22122 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (object);
22124 GList *connections, *l;
22125 GVariant *signal_variant;
22126 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
22128 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
22129 for (l = connections; l != NULL; l = l->next)
22131 GDBusConnection *connection = l->data;
22132 g_dbus_connection_emit_signal (connection,
22133 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "TestUglyCaseInterface", "serversUPDATEDNOW",
22134 signal_variant, NULL);
22136 g_variant_unref (signal_variant);
22137 g_list_free_full (connections, g_object_unref);
22140 static void foo_igen_test_ugly_case_interface_skeleton_iface_init (FooiGenTesTuglyCASEInterfaceIface *iface);
22141 G_DEFINE_TYPE_WITH_CODE (FooiGenTesTuglyCASEInterfaceSkeleton, foo_igen_test_ugly_case_interface_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
22142 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE, foo_igen_test_ugly_case_interface_skeleton_iface_init));
22145 foo_igen_test_ugly_case_interface_skeleton_finalize (GObject *object)
22147 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (object);
22149 for (n = 0; n < 1; n++)
22150 g_value_unset (&skeleton->priv->properties[n]);
22151 g_free (skeleton->priv->properties);
22152 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
22153 if (skeleton->priv->changed_properties_idle_source != NULL)
22154 g_source_destroy (skeleton->priv->changed_properties_idle_source);
22155 g_main_context_unref (skeleton->priv->context);
22156 g_mutex_clear (&skeleton->priv->lock);
22157 G_OBJECT_CLASS (foo_igen_test_ugly_case_interface_skeleton_parent_class)->finalize (object);
22161 foo_igen_test_ugly_case_interface_skeleton_get_property (GObject *object,
22166 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (object);
22167 g_assert (prop_id != 0 && prop_id - 1 < 1);
22168 g_mutex_lock (&skeleton->priv->lock);
22169 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
22170 g_mutex_unlock (&skeleton->priv->lock);
22174 _foo_igen_test_ugly_case_interface_emit_changed (gpointer user_data)
22176 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (user_data);
22178 GVariantBuilder builder;
22179 GVariantBuilder invalidated_builder;
22182 g_mutex_lock (&skeleton->priv->lock);
22183 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
22184 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
22185 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
22187 ChangedProperty *cp = l->data;
22189 const GValue *cur_value;
22191 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
22192 if (!_g_value_equal (cur_value, &cp->orig_value))
22194 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
22195 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
22196 g_variant_unref (variant);
22200 if (num_changes > 0)
22202 GList *connections, *l;
22203 GVariant *signal_variant;
22204 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "TestUglyCaseInterface",
22205 &builder, &invalidated_builder));
22206 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
22207 for (l = connections; l != NULL; l = l->next)
22209 GDBusConnection *connection = l->data;
22211 g_dbus_connection_emit_signal (connection,
22212 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
22213 "org.freedesktop.DBus.Properties",
22214 "PropertiesChanged",
22218 g_variant_unref (signal_variant);
22219 g_list_free_full (connections, g_object_unref);
22223 g_variant_builder_clear (&builder);
22224 g_variant_builder_clear (&invalidated_builder);
22226 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
22227 skeleton->priv->changed_properties = NULL;
22228 skeleton->priv->changed_properties_idle_source = NULL;
22229 g_mutex_unlock (&skeleton->priv->lock);
22234 _foo_igen_test_ugly_case_interface_schedule_emit_changed (FooiGenTesTuglyCASEInterfaceSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
22236 ChangedProperty *cp;
22239 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
22241 ChangedProperty *i_cp = l->data;
22242 if (i_cp->info == info)
22250 cp = g_new0 (ChangedProperty, 1);
22251 cp->prop_id = prop_id;
22253 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
22254 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
22255 g_value_copy (orig_value, &cp->orig_value);
22260 foo_igen_test_ugly_case_interface_skeleton_notify (GObject *object,
22263 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (object);
22264 g_mutex_lock (&skeleton->priv->lock);
22265 if (skeleton->priv->changed_properties != NULL &&
22266 skeleton->priv->changed_properties_idle_source == NULL)
22268 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
22269 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
22270 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_test_ugly_case_interface_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
22271 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
22272 g_source_unref (skeleton->priv->changed_properties_idle_source);
22274 g_mutex_unlock (&skeleton->priv->lock);
22278 foo_igen_test_ugly_case_interface_skeleton_set_property (GObject *object,
22280 const GValue *value,
22283 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (object);
22284 g_assert (prop_id != 0 && prop_id - 1 < 1);
22285 g_mutex_lock (&skeleton->priv->lock);
22286 g_object_freeze_notify (object);
22287 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
22289 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
22290 _foo_igen_test_ugly_case_interface_schedule_emit_changed (skeleton, _foo_igen_test_ugly_case_interface_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
22291 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
22292 g_object_notify_by_pspec (object, pspec);
22294 g_mutex_unlock (&skeleton->priv->lock);
22295 g_object_thaw_notify (object);
22299 foo_igen_test_ugly_case_interface_skeleton_init (FooiGenTesTuglyCASEInterfaceSkeleton *skeleton)
22301 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_SKELETON, FooiGenTesTuglyCASEInterfaceSkeletonPrivate);
22302 g_mutex_init (&skeleton->priv->lock);
22303 skeleton->priv->context = g_main_context_ref_thread_default ();
22304 skeleton->priv->properties = g_new0 (GValue, 1);
22305 g_value_init (&skeleton->priv->properties[0], G_TYPE_INT);
22309 foo_igen_test_ugly_case_interface_skeleton_get_ugly_name (FooiGenTesTuglyCASEInterface *object)
22311 FooiGenTesTuglyCASEInterfaceSkeleton *skeleton = FOO_IGEN_TEST_UGLY_CASE_INTERFACE_SKELETON (object);
22313 g_mutex_lock (&skeleton->priv->lock);
22314 value = g_value_get_int (&(skeleton->priv->properties[0]));
22315 g_mutex_unlock (&skeleton->priv->lock);
22320 foo_igen_test_ugly_case_interface_skeleton_class_init (FooiGenTesTuglyCASEInterfaceSkeletonClass *klass)
22322 GObjectClass *gobject_class;
22323 GDBusInterfaceSkeletonClass *skeleton_class;
22325 g_type_class_add_private (klass, sizeof (FooiGenTesTuglyCASEInterfaceSkeletonPrivate));
22327 gobject_class = G_OBJECT_CLASS (klass);
22328 gobject_class->finalize = foo_igen_test_ugly_case_interface_skeleton_finalize;
22329 gobject_class->get_property = foo_igen_test_ugly_case_interface_skeleton_get_property;
22330 gobject_class->set_property = foo_igen_test_ugly_case_interface_skeleton_set_property;
22331 gobject_class->notify = foo_igen_test_ugly_case_interface_skeleton_notify;
22334 foo_igen_test_ugly_case_interface_override_properties (gobject_class, 1);
22336 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
22337 skeleton_class->get_info = foo_igen_test_ugly_case_interface_skeleton_dbus_interface_get_info;
22338 skeleton_class->get_properties = foo_igen_test_ugly_case_interface_skeleton_dbus_interface_get_properties;
22339 skeleton_class->flush = foo_igen_test_ugly_case_interface_skeleton_dbus_interface_flush;
22340 skeleton_class->get_vtable = foo_igen_test_ugly_case_interface_skeleton_dbus_interface_get_vtable;
22344 foo_igen_test_ugly_case_interface_skeleton_iface_init (FooiGenTesTuglyCASEInterfaceIface *iface)
22346 iface->servers_updated_now = _foo_igen_test_ugly_case_interface_on_signal_servers_updated_now;
22347 iface->get_ugly_name = foo_igen_test_ugly_case_interface_skeleton_get_ugly_name;
22351 * foo_igen_test_ugly_case_interface_skeleton_new:
22353 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link>.
22355 * Returns: (transfer full) (type FooiGenTesTuglyCASEInterfaceSkeleton): The skeleton object.
22357 FooiGenTesTuglyCASEInterface *
22358 foo_igen_test_ugly_case_interface_skeleton_new (void)
22360 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (g_object_new (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_SKELETON, NULL));
22363 /* ------------------------------------------------------------------------
22364 * Code for interface OldieInterface
22365 * ------------------------------------------------------------------------
22369 * SECTION:FooiGenOldieInterface
22370 * @title: FooiGenOldieInterface
22371 * @short_description: Generated C code for the OldieInterface D-Bus interface
22373 * This section contains code for working with the <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link> D-Bus interface in C.
22376 /* ---- Introspection data for OldieInterface ---- */
22378 static const GDBusAnnotationInfo _foo_igen_oldie_interface_method_foo_annotation_info_0 =
22381 "org.freedesktop.DBus.Deprecated",
22386 static const GDBusAnnotationInfo * const _foo_igen_oldie_interface_method_foo_annotation_info_pointers[] =
22388 &_foo_igen_oldie_interface_method_foo_annotation_info_0,
22392 static const _ExtendedGDBusMethodInfo _foo_igen_oldie_interface_method_info_foo =
22399 (GDBusAnnotationInfo **) &_foo_igen_oldie_interface_method_foo_annotation_info_pointers
22405 static const _ExtendedGDBusMethodInfo * const _foo_igen_oldie_interface_method_info_pointers[] =
22407 &_foo_igen_oldie_interface_method_info_foo,
22411 static const GDBusAnnotationInfo _foo_igen_oldie_interface_signal_bar_annotation_info_0 =
22414 "org.freedesktop.DBus.Deprecated",
22419 static const GDBusAnnotationInfo * const _foo_igen_oldie_interface_signal_bar_annotation_info_pointers[] =
22421 &_foo_igen_oldie_interface_signal_bar_annotation_info_0,
22425 static const _ExtendedGDBusSignalInfo _foo_igen_oldie_interface_signal_info_bar =
22431 (GDBusAnnotationInfo **) &_foo_igen_oldie_interface_signal_bar_annotation_info_pointers
22436 static const _ExtendedGDBusSignalInfo * const _foo_igen_oldie_interface_signal_info_pointers[] =
22438 &_foo_igen_oldie_interface_signal_info_bar,
22442 static const GDBusAnnotationInfo _foo_igen_oldie_interface_property_bat_annotation_info_0 =
22445 "org.freedesktop.DBus.Deprecated",
22450 static const GDBusAnnotationInfo * const _foo_igen_oldie_interface_property_bat_annotation_info_pointers[] =
22452 &_foo_igen_oldie_interface_property_bat_annotation_info_0,
22456 static const _ExtendedGDBusPropertyInfo _foo_igen_oldie_interface_property_info_bat =
22462 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
22463 (GDBusAnnotationInfo **) &_foo_igen_oldie_interface_property_bat_annotation_info_pointers
22469 static const _ExtendedGDBusPropertyInfo * const _foo_igen_oldie_interface_property_info_pointers[] =
22471 &_foo_igen_oldie_interface_property_info_bat,
22475 static const GDBusAnnotationInfo _foo_igen_oldie_interface_annotation_info_0 =
22478 "org.freedesktop.DBus.Deprecated",
22483 static const GDBusAnnotationInfo * const _foo_igen_oldie_interface_annotation_info_pointers[] =
22485 &_foo_igen_oldie_interface_annotation_info_0,
22489 static const _ExtendedGDBusInterfaceInfo _foo_igen_oldie_interface_interface_info =
22494 (GDBusMethodInfo **) &_foo_igen_oldie_interface_method_info_pointers,
22495 (GDBusSignalInfo **) &_foo_igen_oldie_interface_signal_info_pointers,
22496 (GDBusPropertyInfo **) &_foo_igen_oldie_interface_property_info_pointers,
22497 (GDBusAnnotationInfo **) &_foo_igen_oldie_interface_annotation_info_pointers
22504 * foo_igen_oldie_interface_interface_info:
22506 * Gets a machine-readable description of the <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link> D-Bus interface.
22508 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
22510 * Deprecated: The D-Bus interface has been deprecated.
22512 GDBusInterfaceInfo *
22513 foo_igen_oldie_interface_interface_info (void)
22515 return (GDBusInterfaceInfo *) &_foo_igen_oldie_interface_interface_info;
22519 * foo_igen_oldie_interface_override_properties:
22520 * @klass: The class structure for a #GObject<!-- -->-derived class.
22521 * @property_id_begin: The property id to assign to the first overridden property.
22523 * Overrides all #GObject properties in the #FooiGenOldieInterface interface for a concrete class.
22524 * The properties are overridden in the order they are defined.
22526 * Returns: The last property id.
22528 * Deprecated: The D-Bus interface has been deprecated.
22531 foo_igen_oldie_interface_override_properties (GObjectClass *klass, guint property_id_begin)
22533 g_object_class_override_property (klass, property_id_begin++, "bat");
22534 return property_id_begin - 1;
22540 * FooiGenOldieInterface:
22542 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link>.
22544 * Deprecated: The D-Bus interface has been deprecated.
22548 * FooiGenOldieInterfaceIface:
22549 * @parent_iface: The parent interface.
22550 * @handle_foo: Handler for the #FooiGenOldieInterface::handle-foo signal.
22551 * @get_bat: Getter for the #FooiGenOldieInterface:bat property.
22552 * @bar: Handler for the #FooiGenOldieInterface::bar signal.
22554 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link>.
22556 * Deprecated: The D-Bus interface has been deprecated.
22560 foo_igen_oldie_interface_default_init (FooiGenOldieInterfaceIface *iface)
22562 /* GObject signals for incoming D-Bus method calls: */
22564 * FooiGenOldieInterface::handle-foo:
22565 * @object: A #FooiGenOldieInterface.
22566 * @invocation: A #GDBusMethodInvocation.
22568 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-OldieInterface.Foo">Foo()</link> D-Bus method.
22570 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_oldie_interface_complete_foo() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
22572 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
22574 * Deprecated: The D-Bus method has been deprecated.
22576 g_signal_new ("handle-foo",
22577 G_TYPE_FROM_INTERFACE (iface),
22579 G_STRUCT_OFFSET (FooiGenOldieInterfaceIface, handle_foo),
22580 g_signal_accumulator_true_handled,
22582 g_cclosure_marshal_generic,
22585 G_TYPE_DBUS_METHOD_INVOCATION);
22587 /* GObject signals for received D-Bus signals: */
22589 * FooiGenOldieInterface::bar:
22590 * @object: A #FooiGenOldieInterface.
22592 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-OldieInterface.Bar">"Bar"</link> is received.
22594 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
22596 * Deprecated: The D-Bus signal has been deprecated.
22598 g_signal_new ("bar",
22599 G_TYPE_FROM_INTERFACE (iface),
22601 G_STRUCT_OFFSET (FooiGenOldieInterfaceIface, bar),
22604 g_cclosure_marshal_generic,
22608 /* GObject properties for D-Bus properties: */
22610 * FooiGenOldieInterface:bat:
22612 * Represents the D-Bus property <link linkend="gdbus-property-OldieInterface.Bat">"Bat"</link>.
22614 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
22616 * Deprecated: The D-Bus property has been deprecated.
22618 g_object_interface_install_property (iface,
22619 g_param_spec_int ("bat", "Bat", "Bat", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
22622 typedef FooiGenOldieInterfaceIface FooiGenOldieInterfaceInterface;
22623 G_DEFINE_INTERFACE (FooiGenOldieInterface, foo_igen_oldie_interface, G_TYPE_OBJECT);
22626 * foo_igen_oldie_interface_get_bat: (skip)
22627 * @object: A #FooiGenOldieInterface.
22629 * Gets the value of the <link linkend="gdbus-property-OldieInterface.Bat">"Bat"</link> D-Bus property.
22631 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
22633 * Returns: The property value.
22635 * Deprecated: The D-Bus property has been deprecated.
22638 foo_igen_oldie_interface_get_bat (FooiGenOldieInterface *object)
22640 return FOO_IGEN_OLDIE_INTERFACE_GET_IFACE (object)->get_bat (object);
22644 * foo_igen_oldie_interface_set_bat: (skip)
22645 * @object: A #FooiGenOldieInterface.
22646 * @value: The value to set.
22648 * Sets the <link linkend="gdbus-property-OldieInterface.Bat">"Bat"</link> D-Bus property to @value.
22650 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
22652 * Deprecated: The D-Bus property has been deprecated.
22655 foo_igen_oldie_interface_set_bat (FooiGenOldieInterface *object, gint value)
22657 g_object_set (G_OBJECT (object), "bat", value, NULL);
22661 * foo_igen_oldie_interface_emit_bar:
22662 * @object: A #FooiGenOldieInterface.
22664 * Emits the <link linkend="gdbus-signal-OldieInterface.Bar">"Bar"</link> D-Bus signal.
22666 * Deprecated: The D-Bus signal has been deprecated.
22669 foo_igen_oldie_interface_emit_bar (
22670 FooiGenOldieInterface *object)
22672 g_signal_emit_by_name (object, "bar");
22676 * foo_igen_oldie_interface_call_foo:
22677 * @proxy: A #FooiGenOldieInterfaceProxy.
22678 * @cancellable: (allow-none): A #GCancellable or %NULL.
22679 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
22680 * @user_data: User data to pass to @callback.
22682 * Asynchronously invokes the <link linkend="gdbus-method-OldieInterface.Foo">Foo()</link> D-Bus method on @proxy.
22683 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
22684 * You can then call foo_igen_oldie_interface_call_foo_finish() to get the result of the operation.
22686 * See foo_igen_oldie_interface_call_foo_sync() for the synchronous, blocking version of this method.
22688 * Deprecated: The D-Bus method has been deprecated.
22691 foo_igen_oldie_interface_call_foo (
22692 FooiGenOldieInterface *proxy,
22693 GCancellable *cancellable,
22694 GAsyncReadyCallback callback,
22695 gpointer user_data)
22697 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
22699 g_variant_new ("()"),
22700 G_DBUS_CALL_FLAGS_NONE,
22708 * foo_igen_oldie_interface_call_foo_finish:
22709 * @proxy: A #FooiGenOldieInterfaceProxy.
22710 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_oldie_interface_call_foo().
22711 * @error: Return location for error or %NULL.
22713 * Finishes an operation started with foo_igen_oldie_interface_call_foo().
22715 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
22717 * Deprecated: The D-Bus method has been deprecated.
22720 foo_igen_oldie_interface_call_foo_finish (
22721 FooiGenOldieInterface *proxy,
22726 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
22729 g_variant_get (_ret,
22731 g_variant_unref (_ret);
22733 return _ret != NULL;
22737 * foo_igen_oldie_interface_call_foo_sync:
22738 * @proxy: A #FooiGenOldieInterfaceProxy.
22739 * @cancellable: (allow-none): A #GCancellable or %NULL.
22740 * @error: Return location for error or %NULL.
22742 * Synchronously invokes the <link linkend="gdbus-method-OldieInterface.Foo">Foo()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
22744 * See foo_igen_oldie_interface_call_foo() for the asynchronous version of this method.
22746 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
22748 * Deprecated: The D-Bus method has been deprecated.
22751 foo_igen_oldie_interface_call_foo_sync (
22752 FooiGenOldieInterface *proxy,
22753 GCancellable *cancellable,
22757 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
22759 g_variant_new ("()"),
22760 G_DBUS_CALL_FLAGS_NONE,
22766 g_variant_get (_ret,
22768 g_variant_unref (_ret);
22770 return _ret != NULL;
22774 * foo_igen_oldie_interface_complete_foo:
22775 * @object: A #FooiGenOldieInterface.
22776 * @invocation: (transfer full): A #GDBusMethodInvocation.
22778 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-OldieInterface.Foo">Foo()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
22780 * This method will free @invocation, you cannot use it afterwards.
22782 * Deprecated: The D-Bus method has been deprecated.
22785 foo_igen_oldie_interface_complete_foo (
22786 FooiGenOldieInterface *object,
22787 GDBusMethodInvocation *invocation)
22789 g_dbus_method_invocation_return_value (invocation,
22790 g_variant_new ("()"));
22793 /* ------------------------------------------------------------------------ */
22796 * FooiGenOldieInterfaceProxy:
22798 * The #FooiGenOldieInterfaceProxy structure contains only private data and should only be accessed using the provided API.
22800 * Deprecated: The D-Bus interface has been deprecated.
22804 * FooiGenOldieInterfaceProxyClass:
22805 * @parent_class: The parent class.
22807 * Class structure for #FooiGenOldieInterfaceProxy.
22809 * Deprecated: The D-Bus interface has been deprecated.
22812 struct _FooiGenOldieInterfaceProxyPrivate
22817 static void foo_igen_oldie_interface_proxy_iface_init (FooiGenOldieInterfaceIface *iface);
22819 G_DEFINE_TYPE_WITH_CODE (FooiGenOldieInterfaceProxy, foo_igen_oldie_interface_proxy, G_TYPE_DBUS_PROXY,
22820 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_OLDIE_INTERFACE, foo_igen_oldie_interface_proxy_iface_init));
22823 foo_igen_oldie_interface_proxy_finalize (GObject *object)
22825 FooiGenOldieInterfaceProxy *proxy = FOO_IGEN_OLDIE_INTERFACE_PROXY (object);
22826 g_datalist_clear (&proxy->priv->qdata);
22827 G_OBJECT_CLASS (foo_igen_oldie_interface_proxy_parent_class)->finalize (object);
22831 foo_igen_oldie_interface_proxy_get_property (GObject *object,
22836 const _ExtendedGDBusPropertyInfo *info;
22838 g_assert (prop_id != 0 && prop_id - 1 < 1);
22839 info = _foo_igen_oldie_interface_property_info_pointers[prop_id - 1];
22840 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
22841 if (info->use_gvariant)
22843 g_value_set_variant (value, variant);
22847 if (variant != NULL)
22848 g_dbus_gvariant_to_gvalue (variant, value);
22850 if (variant != NULL)
22851 g_variant_unref (variant);
22855 foo_igen_oldie_interface_proxy_set_property_cb (GDBusProxy *proxy,
22857 gpointer user_data)
22859 const _ExtendedGDBusPropertyInfo *info = user_data;
22862 if (!g_dbus_proxy_call_finish (proxy, res, &error))
22864 g_warning ("Error setting property `%s' on interface OldieInterface: %s (%s, %d)",
22865 info->parent_struct.name,
22866 error->message, g_quark_to_string (error->domain), error->code);
22867 g_error_free (error);
22872 foo_igen_oldie_interface_proxy_set_property (GObject *object,
22874 const GValue *value,
22877 const _ExtendedGDBusPropertyInfo *info;
22879 g_assert (prop_id != 0 && prop_id - 1 < 1);
22880 info = _foo_igen_oldie_interface_property_info_pointers[prop_id - 1];
22881 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
22882 g_dbus_proxy_call (G_DBUS_PROXY (object),
22883 "org.freedesktop.DBus.Properties.Set",
22884 g_variant_new ("(ssv)", "OldieInterface", info->parent_struct.name, variant),
22885 G_DBUS_CALL_FLAGS_NONE,
22887 NULL, (GAsyncReadyCallback) foo_igen_oldie_interface_proxy_set_property_cb, (gpointer) info);
22888 g_variant_unref (variant);
22892 foo_igen_oldie_interface_proxy_g_signal (GDBusProxy *proxy,
22893 const gchar *sender_name,
22894 const gchar *signal_name,
22895 GVariant *parameters)
22897 _ExtendedGDBusSignalInfo *info;
22904 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_oldie_interface_interface_info, signal_name);
22907 num_params = g_variant_n_children (parameters);
22908 paramv = g_new0 (GValue, num_params + 1);
22909 g_value_init (¶mv[0], FOO_IGEN_TYPE_OLDIE_INTERFACE);
22910 g_value_set_object (¶mv[0], proxy);
22911 g_variant_iter_init (&iter, parameters);
22913 while ((child = g_variant_iter_next_value (&iter)) != NULL)
22915 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
22916 if (arg_info->use_gvariant)
22918 g_value_init (¶mv[n], G_TYPE_VARIANT);
22919 g_value_set_variant (¶mv[n], child);
22923 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
22924 g_variant_unref (child);
22926 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_OLDIE_INTERFACE);
22927 g_signal_emitv (paramv, signal_id, 0, NULL);
22928 for (n = 0; n < num_params + 1; n++)
22929 g_value_unset (¶mv[n]);
22934 foo_igen_oldie_interface_proxy_g_properties_changed (GDBusProxy *_proxy,
22935 GVariant *changed_properties,
22936 const gchar *const *invalidated_properties)
22938 FooiGenOldieInterfaceProxy *proxy = FOO_IGEN_OLDIE_INTERFACE_PROXY (_proxy);
22941 GVariantIter *iter;
22942 _ExtendedGDBusPropertyInfo *info;
22943 g_variant_get (changed_properties, "a{sv}", &iter);
22944 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
22946 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_oldie_interface_interface_info, key);
22947 g_datalist_remove_data (&proxy->priv->qdata, key);
22949 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
22951 g_variant_iter_free (iter);
22952 for (n = 0; invalidated_properties[n] != NULL; n++)
22954 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_oldie_interface_interface_info, invalidated_properties[n]);
22955 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
22957 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
22962 foo_igen_oldie_interface_proxy_get_bat (FooiGenOldieInterface *object)
22964 FooiGenOldieInterfaceProxy *proxy = FOO_IGEN_OLDIE_INTERFACE_PROXY (object);
22967 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Bat");
22968 if (variant != NULL)
22970 value = g_variant_get_int32 (variant);
22971 g_variant_unref (variant);
22977 foo_igen_oldie_interface_proxy_init (FooiGenOldieInterfaceProxy *proxy)
22979 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_OLDIE_INTERFACE_PROXY, FooiGenOldieInterfaceProxyPrivate);
22980 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_oldie_interface_interface_info ());
22984 foo_igen_oldie_interface_proxy_class_init (FooiGenOldieInterfaceProxyClass *klass)
22986 GObjectClass *gobject_class;
22987 GDBusProxyClass *proxy_class;
22989 g_type_class_add_private (klass, sizeof (FooiGenOldieInterfaceProxyPrivate));
22991 gobject_class = G_OBJECT_CLASS (klass);
22992 gobject_class->finalize = foo_igen_oldie_interface_proxy_finalize;
22993 gobject_class->get_property = foo_igen_oldie_interface_proxy_get_property;
22994 gobject_class->set_property = foo_igen_oldie_interface_proxy_set_property;
22996 proxy_class = G_DBUS_PROXY_CLASS (klass);
22997 proxy_class->g_signal = foo_igen_oldie_interface_proxy_g_signal;
22998 proxy_class->g_properties_changed = foo_igen_oldie_interface_proxy_g_properties_changed;
23001 foo_igen_oldie_interface_override_properties (gobject_class, 1);
23005 foo_igen_oldie_interface_proxy_iface_init (FooiGenOldieInterfaceIface *iface)
23007 iface->get_bat = foo_igen_oldie_interface_proxy_get_bat;
23011 * foo_igen_oldie_interface_proxy_new:
23012 * @connection: A #GDBusConnection.
23013 * @flags: Flags from the #GDBusProxyFlags enumeration.
23014 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
23015 * @object_path: An object path.
23016 * @cancellable: (allow-none): A #GCancellable or %NULL.
23017 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
23018 * @user_data: User data to pass to @callback.
23020 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link>. See g_dbus_proxy_new() for more details.
23022 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
23023 * You can then call foo_igen_oldie_interface_proxy_new_finish() to get the result of the operation.
23025 * See foo_igen_oldie_interface_proxy_new_sync() for the synchronous, blocking version of this constructor.
23027 * Deprecated: The D-Bus interface has been deprecated.
23030 foo_igen_oldie_interface_proxy_new (
23031 GDBusConnection *connection,
23032 GDBusProxyFlags flags,
23034 const gchar *object_path,
23035 GCancellable *cancellable,
23036 GAsyncReadyCallback callback,
23037 gpointer user_data)
23039 g_async_initable_new_async (FOO_IGEN_TYPE_OLDIE_INTERFACE_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", "OldieInterface", NULL);
23043 * foo_igen_oldie_interface_proxy_new_finish:
23044 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_oldie_interface_proxy_new().
23045 * @error: Return location for error or %NULL
23047 * Finishes an operation started with foo_igen_oldie_interface_proxy_new().
23049 * Returns: (transfer full) (type FooiGenOldieInterfaceProxy): The constructed proxy object or %NULL if @error is set.
23051 * Deprecated: The D-Bus interface has been deprecated.
23053 FooiGenOldieInterface *
23054 foo_igen_oldie_interface_proxy_new_finish (
23059 GObject *source_object;
23060 source_object = g_async_result_get_source_object (res);
23061 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
23062 g_object_unref (source_object);
23064 return FOO_IGEN_OLDIE_INTERFACE (ret);
23070 * foo_igen_oldie_interface_proxy_new_sync:
23071 * @connection: A #GDBusConnection.
23072 * @flags: Flags from the #GDBusProxyFlags enumeration.
23073 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
23074 * @object_path: An object path.
23075 * @cancellable: (allow-none): A #GCancellable or %NULL.
23076 * @error: Return location for error or %NULL
23078 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link>. See g_dbus_proxy_new_sync() for more details.
23080 * The calling thread is blocked until a reply is received.
23082 * See foo_igen_oldie_interface_proxy_new() for the asynchronous version of this constructor.
23084 * Returns: (transfer full) (type FooiGenOldieInterfaceProxy): The constructed proxy object or %NULL if @error is set.
23086 * Deprecated: The D-Bus interface has been deprecated.
23088 FooiGenOldieInterface *
23089 foo_igen_oldie_interface_proxy_new_sync (
23090 GDBusConnection *connection,
23091 GDBusProxyFlags flags,
23093 const gchar *object_path,
23094 GCancellable *cancellable,
23098 ret = g_initable_new (FOO_IGEN_TYPE_OLDIE_INTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "OldieInterface", NULL);
23100 return FOO_IGEN_OLDIE_INTERFACE (ret);
23107 * foo_igen_oldie_interface_proxy_new_for_bus:
23108 * @bus_type: A #GBusType.
23109 * @flags: Flags from the #GDBusProxyFlags enumeration.
23110 * @name: A bus name (well-known or unique).
23111 * @object_path: An object path.
23112 * @cancellable: (allow-none): A #GCancellable or %NULL.
23113 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
23114 * @user_data: User data to pass to @callback.
23116 * Like foo_igen_oldie_interface_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
23118 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
23119 * You can then call foo_igen_oldie_interface_proxy_new_for_bus_finish() to get the result of the operation.
23121 * See foo_igen_oldie_interface_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
23123 * Deprecated: The D-Bus interface has been deprecated.
23126 foo_igen_oldie_interface_proxy_new_for_bus (
23128 GDBusProxyFlags flags,
23130 const gchar *object_path,
23131 GCancellable *cancellable,
23132 GAsyncReadyCallback callback,
23133 gpointer user_data)
23135 g_async_initable_new_async (FOO_IGEN_TYPE_OLDIE_INTERFACE_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", "OldieInterface", NULL);
23139 * foo_igen_oldie_interface_proxy_new_for_bus_finish:
23140 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_oldie_interface_proxy_new_for_bus().
23141 * @error: Return location for error or %NULL
23143 * Finishes an operation started with foo_igen_oldie_interface_proxy_new_for_bus().
23145 * Returns: (transfer full) (type FooiGenOldieInterfaceProxy): The constructed proxy object or %NULL if @error is set.
23147 * Deprecated: The D-Bus interface has been deprecated.
23149 FooiGenOldieInterface *
23150 foo_igen_oldie_interface_proxy_new_for_bus_finish (
23155 GObject *source_object;
23156 source_object = g_async_result_get_source_object (res);
23157 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
23158 g_object_unref (source_object);
23160 return FOO_IGEN_OLDIE_INTERFACE (ret);
23166 * foo_igen_oldie_interface_proxy_new_for_bus_sync:
23167 * @bus_type: A #GBusType.
23168 * @flags: Flags from the #GDBusProxyFlags enumeration.
23169 * @name: A bus name (well-known or unique).
23170 * @object_path: An object path.
23171 * @cancellable: (allow-none): A #GCancellable or %NULL.
23172 * @error: Return location for error or %NULL
23174 * Like foo_igen_oldie_interface_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
23176 * The calling thread is blocked until a reply is received.
23178 * See foo_igen_oldie_interface_proxy_new_for_bus() for the asynchronous version of this constructor.
23180 * Returns: (transfer full) (type FooiGenOldieInterfaceProxy): The constructed proxy object or %NULL if @error is set.
23182 * Deprecated: The D-Bus interface has been deprecated.
23184 FooiGenOldieInterface *
23185 foo_igen_oldie_interface_proxy_new_for_bus_sync (
23187 GDBusProxyFlags flags,
23189 const gchar *object_path,
23190 GCancellable *cancellable,
23194 ret = g_initable_new (FOO_IGEN_TYPE_OLDIE_INTERFACE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "OldieInterface", NULL);
23196 return FOO_IGEN_OLDIE_INTERFACE (ret);
23202 /* ------------------------------------------------------------------------ */
23205 * FooiGenOldieInterfaceSkeleton:
23207 * The #FooiGenOldieInterfaceSkeleton structure contains only private data and should only be accessed using the provided API.
23209 * Deprecated: The D-Bus interface has been deprecated.
23213 * FooiGenOldieInterfaceSkeletonClass:
23214 * @parent_class: The parent class.
23216 * Class structure for #FooiGenOldieInterfaceSkeleton.
23218 * Deprecated: The D-Bus interface has been deprecated.
23221 struct _FooiGenOldieInterfaceSkeletonPrivate
23223 GValue *properties;
23224 GList *changed_properties;
23225 GSource *changed_properties_idle_source;
23226 GMainContext *context;
23231 _foo_igen_oldie_interface_skeleton_handle_method_call (
23232 GDBusConnection *connection,
23233 const gchar *sender,
23234 const gchar *object_path,
23235 const gchar *interface_name,
23236 const gchar *method_name,
23237 GVariant *parameters,
23238 GDBusMethodInvocation *invocation,
23239 gpointer user_data)
23241 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (user_data);
23242 _ExtendedGDBusMethodInfo *info;
23250 GValue return_value = G_VALUE_INIT;
23251 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
23252 g_assert (info != NULL);
23253 num_params = g_variant_n_children (parameters);
23254 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
23256 g_value_init (¶mv[n], FOO_IGEN_TYPE_OLDIE_INTERFACE);
23257 g_value_set_object (¶mv[n++], skeleton);
23258 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
23259 g_value_set_object (¶mv[n++], invocation);
23260 if (info->pass_fdlist)
23263 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
23264 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
23266 g_assert_not_reached ();
23269 g_variant_iter_init (&iter, parameters);
23270 while ((child = g_variant_iter_next_value (&iter)) != NULL)
23272 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
23273 if (arg_info->use_gvariant)
23275 g_value_init (¶mv[n], G_TYPE_VARIANT);
23276 g_value_set_variant (¶mv[n], child);
23280 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
23281 g_variant_unref (child);
23283 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_OLDIE_INTERFACE);
23284 g_value_init (&return_value, G_TYPE_BOOLEAN);
23285 g_signal_emitv (paramv, signal_id, 0, &return_value);
23286 if (!g_value_get_boolean (&return_value))
23287 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
23288 g_value_unset (&return_value);
23289 for (n = 0; n < num_params + num_extra; n++)
23290 g_value_unset (¶mv[n]);
23295 _foo_igen_oldie_interface_skeleton_handle_get_property (
23296 GDBusConnection *connection,
23297 const gchar *sender,
23298 const gchar *object_path,
23299 const gchar *interface_name,
23300 const gchar *property_name,
23302 gpointer user_data)
23304 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (user_data);
23305 GValue value = G_VALUE_INIT;
23307 _ExtendedGDBusPropertyInfo *info;
23310 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_oldie_interface_interface_info, property_name);
23311 g_assert (info != NULL);
23312 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
23315 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
23319 g_value_init (&value, pspec->value_type);
23320 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
23321 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
23322 g_value_unset (&value);
23328 _foo_igen_oldie_interface_skeleton_handle_set_property (
23329 GDBusConnection *connection,
23330 const gchar *sender,
23331 const gchar *object_path,
23332 const gchar *interface_name,
23333 const gchar *property_name,
23336 gpointer user_data)
23338 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (user_data);
23339 GValue value = G_VALUE_INIT;
23341 _ExtendedGDBusPropertyInfo *info;
23344 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_oldie_interface_interface_info, property_name);
23345 g_assert (info != NULL);
23346 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
23349 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
23353 if (info->use_gvariant)
23354 g_value_set_variant (&value, variant);
23356 g_dbus_gvariant_to_gvalue (variant, &value);
23357 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
23358 g_value_unset (&value);
23364 static const GDBusInterfaceVTable _foo_igen_oldie_interface_skeleton_vtable =
23366 _foo_igen_oldie_interface_skeleton_handle_method_call,
23367 _foo_igen_oldie_interface_skeleton_handle_get_property,
23368 _foo_igen_oldie_interface_skeleton_handle_set_property
23371 static GDBusInterfaceInfo *
23372 foo_igen_oldie_interface_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
23374 return foo_igen_oldie_interface_interface_info ();
23377 static GDBusInterfaceVTable *
23378 foo_igen_oldie_interface_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
23380 return (GDBusInterfaceVTable *) &_foo_igen_oldie_interface_skeleton_vtable;
23384 foo_igen_oldie_interface_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
23386 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (_skeleton);
23388 GVariantBuilder builder;
23390 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
23391 if (_foo_igen_oldie_interface_interface_info.parent_struct.properties == NULL)
23393 for (n = 0; _foo_igen_oldie_interface_interface_info.parent_struct.properties[n] != NULL; n++)
23395 GDBusPropertyInfo *info = _foo_igen_oldie_interface_interface_info.parent_struct.properties[n];
23396 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
23399 value = _foo_igen_oldie_interface_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "OldieInterface", info->name, NULL, skeleton);
23402 g_variant_take_ref (value);
23403 g_variant_builder_add (&builder, "{sv}", info->name, value);
23404 g_variant_unref (value);
23409 return g_variant_builder_end (&builder);
23412 static gboolean _foo_igen_oldie_interface_emit_changed (gpointer user_data);
23415 foo_igen_oldie_interface_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
23417 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (_skeleton);
23418 gboolean emit_changed = FALSE;
23420 g_mutex_lock (&skeleton->priv->lock);
23421 if (skeleton->priv->changed_properties_idle_source != NULL)
23423 g_source_destroy (skeleton->priv->changed_properties_idle_source);
23424 skeleton->priv->changed_properties_idle_source = NULL;
23425 emit_changed = TRUE;
23427 g_mutex_unlock (&skeleton->priv->lock);
23430 _foo_igen_oldie_interface_emit_changed (skeleton);
23434 _foo_igen_oldie_interface_on_signal_bar (
23435 FooiGenOldieInterface *object)
23437 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (object);
23439 GList *connections, *l;
23440 GVariant *signal_variant;
23441 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
23443 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
23444 for (l = connections; l != NULL; l = l->next)
23446 GDBusConnection *connection = l->data;
23447 g_dbus_connection_emit_signal (connection,
23448 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "OldieInterface", "Bar",
23449 signal_variant, NULL);
23451 g_variant_unref (signal_variant);
23452 g_list_free_full (connections, g_object_unref);
23455 static void foo_igen_oldie_interface_skeleton_iface_init (FooiGenOldieInterfaceIface *iface);
23456 G_DEFINE_TYPE_WITH_CODE (FooiGenOldieInterfaceSkeleton, foo_igen_oldie_interface_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
23457 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_OLDIE_INTERFACE, foo_igen_oldie_interface_skeleton_iface_init));
23460 foo_igen_oldie_interface_skeleton_finalize (GObject *object)
23462 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (object);
23464 for (n = 0; n < 1; n++)
23465 g_value_unset (&skeleton->priv->properties[n]);
23466 g_free (skeleton->priv->properties);
23467 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
23468 if (skeleton->priv->changed_properties_idle_source != NULL)
23469 g_source_destroy (skeleton->priv->changed_properties_idle_source);
23470 g_main_context_unref (skeleton->priv->context);
23471 g_mutex_clear (&skeleton->priv->lock);
23472 G_OBJECT_CLASS (foo_igen_oldie_interface_skeleton_parent_class)->finalize (object);
23476 foo_igen_oldie_interface_skeleton_get_property (GObject *object,
23481 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (object);
23482 g_assert (prop_id != 0 && prop_id - 1 < 1);
23483 g_mutex_lock (&skeleton->priv->lock);
23484 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
23485 g_mutex_unlock (&skeleton->priv->lock);
23489 _foo_igen_oldie_interface_emit_changed (gpointer user_data)
23491 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (user_data);
23493 GVariantBuilder builder;
23494 GVariantBuilder invalidated_builder;
23497 g_mutex_lock (&skeleton->priv->lock);
23498 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
23499 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
23500 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
23502 ChangedProperty *cp = l->data;
23504 const GValue *cur_value;
23506 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
23507 if (!_g_value_equal (cur_value, &cp->orig_value))
23509 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
23510 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
23511 g_variant_unref (variant);
23515 if (num_changes > 0)
23517 GList *connections, *l;
23518 GVariant *signal_variant;
23519 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "OldieInterface",
23520 &builder, &invalidated_builder));
23521 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
23522 for (l = connections; l != NULL; l = l->next)
23524 GDBusConnection *connection = l->data;
23526 g_dbus_connection_emit_signal (connection,
23527 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
23528 "org.freedesktop.DBus.Properties",
23529 "PropertiesChanged",
23533 g_variant_unref (signal_variant);
23534 g_list_free_full (connections, g_object_unref);
23538 g_variant_builder_clear (&builder);
23539 g_variant_builder_clear (&invalidated_builder);
23541 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
23542 skeleton->priv->changed_properties = NULL;
23543 skeleton->priv->changed_properties_idle_source = NULL;
23544 g_mutex_unlock (&skeleton->priv->lock);
23549 _foo_igen_oldie_interface_schedule_emit_changed (FooiGenOldieInterfaceSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
23551 ChangedProperty *cp;
23554 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
23556 ChangedProperty *i_cp = l->data;
23557 if (i_cp->info == info)
23565 cp = g_new0 (ChangedProperty, 1);
23566 cp->prop_id = prop_id;
23568 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
23569 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
23570 g_value_copy (orig_value, &cp->orig_value);
23575 foo_igen_oldie_interface_skeleton_notify (GObject *object,
23578 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (object);
23579 g_mutex_lock (&skeleton->priv->lock);
23580 if (skeleton->priv->changed_properties != NULL &&
23581 skeleton->priv->changed_properties_idle_source == NULL)
23583 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
23584 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
23585 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_oldie_interface_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
23586 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
23587 g_source_unref (skeleton->priv->changed_properties_idle_source);
23589 g_mutex_unlock (&skeleton->priv->lock);
23593 foo_igen_oldie_interface_skeleton_set_property (GObject *object,
23595 const GValue *value,
23598 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (object);
23599 g_assert (prop_id != 0 && prop_id - 1 < 1);
23600 g_mutex_lock (&skeleton->priv->lock);
23601 g_object_freeze_notify (object);
23602 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
23604 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
23605 _foo_igen_oldie_interface_schedule_emit_changed (skeleton, _foo_igen_oldie_interface_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
23606 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
23607 g_object_notify_by_pspec (object, pspec);
23609 g_mutex_unlock (&skeleton->priv->lock);
23610 g_object_thaw_notify (object);
23614 foo_igen_oldie_interface_skeleton_init (FooiGenOldieInterfaceSkeleton *skeleton)
23616 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_OLDIE_INTERFACE_SKELETON, FooiGenOldieInterfaceSkeletonPrivate);
23617 g_mutex_init (&skeleton->priv->lock);
23618 skeleton->priv->context = g_main_context_ref_thread_default ();
23619 skeleton->priv->properties = g_new0 (GValue, 1);
23620 g_value_init (&skeleton->priv->properties[0], G_TYPE_INT);
23624 foo_igen_oldie_interface_skeleton_get_bat (FooiGenOldieInterface *object)
23626 FooiGenOldieInterfaceSkeleton *skeleton = FOO_IGEN_OLDIE_INTERFACE_SKELETON (object);
23628 g_mutex_lock (&skeleton->priv->lock);
23629 value = g_value_get_int (&(skeleton->priv->properties[0]));
23630 g_mutex_unlock (&skeleton->priv->lock);
23635 foo_igen_oldie_interface_skeleton_class_init (FooiGenOldieInterfaceSkeletonClass *klass)
23637 GObjectClass *gobject_class;
23638 GDBusInterfaceSkeletonClass *skeleton_class;
23640 g_type_class_add_private (klass, sizeof (FooiGenOldieInterfaceSkeletonPrivate));
23642 gobject_class = G_OBJECT_CLASS (klass);
23643 gobject_class->finalize = foo_igen_oldie_interface_skeleton_finalize;
23644 gobject_class->get_property = foo_igen_oldie_interface_skeleton_get_property;
23645 gobject_class->set_property = foo_igen_oldie_interface_skeleton_set_property;
23646 gobject_class->notify = foo_igen_oldie_interface_skeleton_notify;
23649 foo_igen_oldie_interface_override_properties (gobject_class, 1);
23651 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
23652 skeleton_class->get_info = foo_igen_oldie_interface_skeleton_dbus_interface_get_info;
23653 skeleton_class->get_properties = foo_igen_oldie_interface_skeleton_dbus_interface_get_properties;
23654 skeleton_class->flush = foo_igen_oldie_interface_skeleton_dbus_interface_flush;
23655 skeleton_class->get_vtable = foo_igen_oldie_interface_skeleton_dbus_interface_get_vtable;
23659 foo_igen_oldie_interface_skeleton_iface_init (FooiGenOldieInterfaceIface *iface)
23661 iface->bar = _foo_igen_oldie_interface_on_signal_bar;
23662 iface->get_bat = foo_igen_oldie_interface_skeleton_get_bat;
23666 * foo_igen_oldie_interface_skeleton_new:
23668 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link>.
23670 * Returns: (transfer full) (type FooiGenOldieInterfaceSkeleton): The skeleton object.
23672 * Deprecated: The D-Bus interface has been deprecated.
23674 FooiGenOldieInterface *
23675 foo_igen_oldie_interface_skeleton_new (void)
23677 return FOO_IGEN_OLDIE_INTERFACE (g_object_new (FOO_IGEN_TYPE_OLDIE_INTERFACE_SKELETON, NULL));
23680 /* ------------------------------------------------------------------------
23681 * Code for interface UnknownXmlTags
23682 * ------------------------------------------------------------------------
23686 * SECTION:FooiGenUnknownXmlTags
23687 * @title: FooiGenUnknownXmlTags
23688 * @short_description: Generated C code for the UnknownXmlTags D-Bus interface
23690 * This section contains code for working with the <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link> D-Bus interface in C.
23693 /* ---- Introspection data for UnknownXmlTags ---- */
23695 static const _ExtendedGDBusArgInfo _foo_igen_unknown_xml_tags_method_info_can_set_timezone_OUT_ARG_value =
23706 static const _ExtendedGDBusArgInfo * const _foo_igen_unknown_xml_tags_method_info_can_set_timezone_OUT_ARG_pointers[] =
23708 &_foo_igen_unknown_xml_tags_method_info_can_set_timezone_OUT_ARG_value,
23712 static const GDBusAnnotationInfo _foo_igen_unknown_xml_tags_method_can_set_timezone_annotation_info_0 =
23715 "org.freedesktop.DBus.GLib.Async",
23720 static const GDBusAnnotationInfo * const _foo_igen_unknown_xml_tags_method_can_set_timezone_annotation_info_pointers[] =
23722 &_foo_igen_unknown_xml_tags_method_can_set_timezone_annotation_info_0,
23726 static const _ExtendedGDBusMethodInfo _foo_igen_unknown_xml_tags_method_info_can_set_timezone =
23732 (GDBusArgInfo **) &_foo_igen_unknown_xml_tags_method_info_can_set_timezone_OUT_ARG_pointers,
23733 (GDBusAnnotationInfo **) &_foo_igen_unknown_xml_tags_method_can_set_timezone_annotation_info_pointers
23735 "handle-can-set-timezone",
23739 static const _ExtendedGDBusMethodInfo * const _foo_igen_unknown_xml_tags_method_info_pointers[] =
23741 &_foo_igen_unknown_xml_tags_method_info_can_set_timezone,
23745 static const _ExtendedGDBusSignalInfo _foo_igen_unknown_xml_tags_signal_info_some_signal =
23756 static const _ExtendedGDBusSignalInfo * const _foo_igen_unknown_xml_tags_signal_info_pointers[] =
23758 &_foo_igen_unknown_xml_tags_signal_info_some_signal,
23762 static const _ExtendedGDBusPropertyInfo _foo_igen_unknown_xml_tags_property_info_some_property =
23768 G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
23775 static const _ExtendedGDBusPropertyInfo * const _foo_igen_unknown_xml_tags_property_info_pointers[] =
23777 &_foo_igen_unknown_xml_tags_property_info_some_property,
23781 static const _ExtendedGDBusInterfaceInfo _foo_igen_unknown_xml_tags_interface_info =
23786 (GDBusMethodInfo **) &_foo_igen_unknown_xml_tags_method_info_pointers,
23787 (GDBusSignalInfo **) &_foo_igen_unknown_xml_tags_signal_info_pointers,
23788 (GDBusPropertyInfo **) &_foo_igen_unknown_xml_tags_property_info_pointers,
23791 "unknown-xml-tags",
23796 * foo_igen_unknown_xml_tags_interface_info:
23798 * Gets a machine-readable description of the <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link> D-Bus interface.
23800 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
23802 GDBusInterfaceInfo *
23803 foo_igen_unknown_xml_tags_interface_info (void)
23805 return (GDBusInterfaceInfo *) &_foo_igen_unknown_xml_tags_interface_info;
23809 * foo_igen_unknown_xml_tags_override_properties:
23810 * @klass: The class structure for a #GObject<!-- -->-derived class.
23811 * @property_id_begin: The property id to assign to the first overridden property.
23813 * Overrides all #GObject properties in the #FooiGenUnknownXmlTags interface for a concrete class.
23814 * The properties are overridden in the order they are defined.
23816 * Returns: The last property id.
23819 foo_igen_unknown_xml_tags_override_properties (GObjectClass *klass, guint property_id_begin)
23821 g_object_class_override_property (klass, property_id_begin++, "some-property");
23822 return property_id_begin - 1;
23828 * FooiGenUnknownXmlTags:
23830 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link>.
23834 * FooiGenUnknownXmlTagsIface:
23835 * @parent_iface: The parent interface.
23836 * @handle_can_set_timezone: Handler for the #FooiGenUnknownXmlTags::handle-can-set-timezone signal.
23837 * @get_some_property: Getter for the #FooiGenUnknownXmlTags:some-property property.
23838 * @some_signal: Handler for the #FooiGenUnknownXmlTags::some-signal signal.
23840 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link>.
23844 foo_igen_unknown_xml_tags_default_init (FooiGenUnknownXmlTagsIface *iface)
23846 /* GObject signals for incoming D-Bus method calls: */
23848 * FooiGenUnknownXmlTags::handle-can-set-timezone:
23849 * @object: A #FooiGenUnknownXmlTags.
23850 * @invocation: A #GDBusMethodInvocation.
23852 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-UnknownXmlTags.CanSetTimezone">CanSetTimezone()</link> D-Bus method.
23854 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_unknown_xml_tags_complete_can_set_timezone() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
23856 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
23858 g_signal_new ("handle-can-set-timezone",
23859 G_TYPE_FROM_INTERFACE (iface),
23861 G_STRUCT_OFFSET (FooiGenUnknownXmlTagsIface, handle_can_set_timezone),
23862 g_signal_accumulator_true_handled,
23864 g_cclosure_marshal_generic,
23867 G_TYPE_DBUS_METHOD_INVOCATION);
23869 /* GObject signals for received D-Bus signals: */
23871 * FooiGenUnknownXmlTags::some-signal:
23872 * @object: A #FooiGenUnknownXmlTags.
23874 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-UnknownXmlTags.SomeSignal">"SomeSignal"</link> is received.
23876 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
23878 g_signal_new ("some-signal",
23879 G_TYPE_FROM_INTERFACE (iface),
23881 G_STRUCT_OFFSET (FooiGenUnknownXmlTagsIface, some_signal),
23884 g_cclosure_marshal_generic,
23888 /* GObject properties for D-Bus properties: */
23890 * FooiGenUnknownXmlTags:some-property:
23892 * Represents the D-Bus property <link linkend="gdbus-property-UnknownXmlTags.SomeProperty">"SomeProperty"</link>.
23894 * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
23896 g_object_interface_install_property (iface,
23897 g_param_spec_string ("some-property", "SomeProperty", "SomeProperty", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
23900 typedef FooiGenUnknownXmlTagsIface FooiGenUnknownXmlTagsInterface;
23901 G_DEFINE_INTERFACE (FooiGenUnknownXmlTags, foo_igen_unknown_xml_tags, G_TYPE_OBJECT);
23904 * foo_igen_unknown_xml_tags_get_some_property: (skip)
23905 * @object: A #FooiGenUnknownXmlTags.
23907 * Gets the value of the <link linkend="gdbus-property-UnknownXmlTags.SomeProperty">"SomeProperty"</link> D-Bus property.
23909 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
23911 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use foo_igen_unknown_xml_tags_dup_some_property() if on another thread.</warning>
23913 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
23916 foo_igen_unknown_xml_tags_get_some_property (FooiGenUnknownXmlTags *object)
23918 return FOO_IGEN_UNKNOWN_XML_TAGS_GET_IFACE (object)->get_some_property (object);
23922 * foo_igen_unknown_xml_tags_dup_some_property: (skip)
23923 * @object: A #FooiGenUnknownXmlTags.
23925 * Gets a copy of the <link linkend="gdbus-property-UnknownXmlTags.SomeProperty">"SomeProperty"</link> D-Bus property.
23927 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
23929 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
23932 foo_igen_unknown_xml_tags_dup_some_property (FooiGenUnknownXmlTags *object)
23935 g_object_get (G_OBJECT (object), "some-property", &value, NULL);
23940 * foo_igen_unknown_xml_tags_set_some_property: (skip)
23941 * @object: A #FooiGenUnknownXmlTags.
23942 * @value: The value to set.
23944 * Sets the <link linkend="gdbus-property-UnknownXmlTags.SomeProperty">"SomeProperty"</link> D-Bus property to @value.
23946 * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
23949 foo_igen_unknown_xml_tags_set_some_property (FooiGenUnknownXmlTags *object, const gchar *value)
23951 g_object_set (G_OBJECT (object), "some-property", value, NULL);
23955 * foo_igen_unknown_xml_tags_emit_some_signal:
23956 * @object: A #FooiGenUnknownXmlTags.
23958 * Emits the <link linkend="gdbus-signal-UnknownXmlTags.SomeSignal">"SomeSignal"</link> D-Bus signal.
23961 foo_igen_unknown_xml_tags_emit_some_signal (
23962 FooiGenUnknownXmlTags *object)
23964 g_signal_emit_by_name (object, "some-signal");
23968 * foo_igen_unknown_xml_tags_call_can_set_timezone:
23969 * @proxy: A #FooiGenUnknownXmlTagsProxy.
23970 * @cancellable: (allow-none): A #GCancellable or %NULL.
23971 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
23972 * @user_data: User data to pass to @callback.
23974 * Asynchronously invokes the <link linkend="gdbus-method-UnknownXmlTags.CanSetTimezone">CanSetTimezone()</link> D-Bus method on @proxy.
23975 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
23976 * You can then call foo_igen_unknown_xml_tags_call_can_set_timezone_finish() to get the result of the operation.
23978 * See foo_igen_unknown_xml_tags_call_can_set_timezone_sync() for the synchronous, blocking version of this method.
23981 foo_igen_unknown_xml_tags_call_can_set_timezone (
23982 FooiGenUnknownXmlTags *proxy,
23983 GCancellable *cancellable,
23984 GAsyncReadyCallback callback,
23985 gpointer user_data)
23987 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
23989 g_variant_new ("()"),
23990 G_DBUS_CALL_FLAGS_NONE,
23998 * foo_igen_unknown_xml_tags_call_can_set_timezone_finish:
23999 * @proxy: A #FooiGenUnknownXmlTagsProxy.
24000 * @out_value: (out): Return location for return parameter or %NULL to ignore.
24001 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_unknown_xml_tags_call_can_set_timezone().
24002 * @error: Return location for error or %NULL.
24004 * Finishes an operation started with foo_igen_unknown_xml_tags_call_can_set_timezone().
24006 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
24009 foo_igen_unknown_xml_tags_call_can_set_timezone_finish (
24010 FooiGenUnknownXmlTags *proxy,
24016 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
24019 g_variant_get (_ret,
24022 g_variant_unref (_ret);
24024 return _ret != NULL;
24028 * foo_igen_unknown_xml_tags_call_can_set_timezone_sync:
24029 * @proxy: A #FooiGenUnknownXmlTagsProxy.
24030 * @out_value: (out): Return location for return parameter or %NULL to ignore.
24031 * @cancellable: (allow-none): A #GCancellable or %NULL.
24032 * @error: Return location for error or %NULL.
24034 * Synchronously invokes the <link linkend="gdbus-method-UnknownXmlTags.CanSetTimezone">CanSetTimezone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
24036 * See foo_igen_unknown_xml_tags_call_can_set_timezone() for the asynchronous version of this method.
24038 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
24041 foo_igen_unknown_xml_tags_call_can_set_timezone_sync (
24042 FooiGenUnknownXmlTags *proxy,
24044 GCancellable *cancellable,
24048 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
24050 g_variant_new ("()"),
24051 G_DBUS_CALL_FLAGS_NONE,
24057 g_variant_get (_ret,
24060 g_variant_unref (_ret);
24062 return _ret != NULL;
24066 * foo_igen_unknown_xml_tags_complete_can_set_timezone:
24067 * @object: A #FooiGenUnknownXmlTags.
24068 * @invocation: (transfer full): A #GDBusMethodInvocation.
24069 * @value: Parameter to return.
24071 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-UnknownXmlTags.CanSetTimezone">CanSetTimezone()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
24073 * This method will free @invocation, you cannot use it afterwards.
24076 foo_igen_unknown_xml_tags_complete_can_set_timezone (
24077 FooiGenUnknownXmlTags *object,
24078 GDBusMethodInvocation *invocation,
24081 g_dbus_method_invocation_return_value (invocation,
24082 g_variant_new ("(i)",
24086 /* ------------------------------------------------------------------------ */
24089 * FooiGenUnknownXmlTagsProxy:
24091 * The #FooiGenUnknownXmlTagsProxy structure contains only private data and should only be accessed using the provided API.
24095 * FooiGenUnknownXmlTagsProxyClass:
24096 * @parent_class: The parent class.
24098 * Class structure for #FooiGenUnknownXmlTagsProxy.
24101 struct _FooiGenUnknownXmlTagsProxyPrivate
24106 static void foo_igen_unknown_xml_tags_proxy_iface_init (FooiGenUnknownXmlTagsIface *iface);
24108 G_DEFINE_TYPE_WITH_CODE (FooiGenUnknownXmlTagsProxy, foo_igen_unknown_xml_tags_proxy, G_TYPE_DBUS_PROXY,
24109 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS, foo_igen_unknown_xml_tags_proxy_iface_init));
24112 foo_igen_unknown_xml_tags_proxy_finalize (GObject *object)
24114 FooiGenUnknownXmlTagsProxy *proxy = FOO_IGEN_UNKNOWN_XML_TAGS_PROXY (object);
24115 g_datalist_clear (&proxy->priv->qdata);
24116 G_OBJECT_CLASS (foo_igen_unknown_xml_tags_proxy_parent_class)->finalize (object);
24120 foo_igen_unknown_xml_tags_proxy_get_property (GObject *object,
24125 const _ExtendedGDBusPropertyInfo *info;
24127 g_assert (prop_id != 0 && prop_id - 1 < 1);
24128 info = _foo_igen_unknown_xml_tags_property_info_pointers[prop_id - 1];
24129 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
24130 if (info->use_gvariant)
24132 g_value_set_variant (value, variant);
24136 if (variant != NULL)
24137 g_dbus_gvariant_to_gvalue (variant, value);
24139 if (variant != NULL)
24140 g_variant_unref (variant);
24144 foo_igen_unknown_xml_tags_proxy_set_property_cb (GDBusProxy *proxy,
24146 gpointer user_data)
24148 const _ExtendedGDBusPropertyInfo *info = user_data;
24151 if (!g_dbus_proxy_call_finish (proxy, res, &error))
24153 g_warning ("Error setting property `%s' on interface UnknownXmlTags: %s (%s, %d)",
24154 info->parent_struct.name,
24155 error->message, g_quark_to_string (error->domain), error->code);
24156 g_error_free (error);
24161 foo_igen_unknown_xml_tags_proxy_set_property (GObject *object,
24163 const GValue *value,
24166 const _ExtendedGDBusPropertyInfo *info;
24168 g_assert (prop_id != 0 && prop_id - 1 < 1);
24169 info = _foo_igen_unknown_xml_tags_property_info_pointers[prop_id - 1];
24170 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
24171 g_dbus_proxy_call (G_DBUS_PROXY (object),
24172 "org.freedesktop.DBus.Properties.Set",
24173 g_variant_new ("(ssv)", "UnknownXmlTags", info->parent_struct.name, variant),
24174 G_DBUS_CALL_FLAGS_NONE,
24176 NULL, (GAsyncReadyCallback) foo_igen_unknown_xml_tags_proxy_set_property_cb, (gpointer) info);
24177 g_variant_unref (variant);
24181 foo_igen_unknown_xml_tags_proxy_g_signal (GDBusProxy *proxy,
24182 const gchar *sender_name,
24183 const gchar *signal_name,
24184 GVariant *parameters)
24186 _ExtendedGDBusSignalInfo *info;
24193 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_unknown_xml_tags_interface_info, signal_name);
24196 num_params = g_variant_n_children (parameters);
24197 paramv = g_new0 (GValue, num_params + 1);
24198 g_value_init (¶mv[0], FOO_IGEN_TYPE_UNKNOWN_XML_TAGS);
24199 g_value_set_object (¶mv[0], proxy);
24200 g_variant_iter_init (&iter, parameters);
24202 while ((child = g_variant_iter_next_value (&iter)) != NULL)
24204 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
24205 if (arg_info->use_gvariant)
24207 g_value_init (¶mv[n], G_TYPE_VARIANT);
24208 g_value_set_variant (¶mv[n], child);
24212 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
24213 g_variant_unref (child);
24215 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_UNKNOWN_XML_TAGS);
24216 g_signal_emitv (paramv, signal_id, 0, NULL);
24217 for (n = 0; n < num_params + 1; n++)
24218 g_value_unset (¶mv[n]);
24223 foo_igen_unknown_xml_tags_proxy_g_properties_changed (GDBusProxy *_proxy,
24224 GVariant *changed_properties,
24225 const gchar *const *invalidated_properties)
24227 FooiGenUnknownXmlTagsProxy *proxy = FOO_IGEN_UNKNOWN_XML_TAGS_PROXY (_proxy);
24230 GVariantIter *iter;
24231 _ExtendedGDBusPropertyInfo *info;
24232 g_variant_get (changed_properties, "a{sv}", &iter);
24233 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
24235 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_unknown_xml_tags_interface_info, key);
24236 g_datalist_remove_data (&proxy->priv->qdata, key);
24238 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
24240 g_variant_iter_free (iter);
24241 for (n = 0; invalidated_properties[n] != NULL; n++)
24243 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_unknown_xml_tags_interface_info, invalidated_properties[n]);
24244 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
24246 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
24250 static const gchar *
24251 foo_igen_unknown_xml_tags_proxy_get_some_property (FooiGenUnknownXmlTags *object)
24253 FooiGenUnknownXmlTagsProxy *proxy = FOO_IGEN_UNKNOWN_XML_TAGS_PROXY (object);
24255 const gchar *value = NULL;
24256 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SomeProperty");
24257 if (variant != NULL)
24259 value = g_variant_get_string (variant, NULL);
24260 g_variant_unref (variant);
24266 foo_igen_unknown_xml_tags_proxy_init (FooiGenUnknownXmlTagsProxy *proxy)
24268 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_PROXY, FooiGenUnknownXmlTagsProxyPrivate);
24269 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_unknown_xml_tags_interface_info ());
24273 foo_igen_unknown_xml_tags_proxy_class_init (FooiGenUnknownXmlTagsProxyClass *klass)
24275 GObjectClass *gobject_class;
24276 GDBusProxyClass *proxy_class;
24278 g_type_class_add_private (klass, sizeof (FooiGenUnknownXmlTagsProxyPrivate));
24280 gobject_class = G_OBJECT_CLASS (klass);
24281 gobject_class->finalize = foo_igen_unknown_xml_tags_proxy_finalize;
24282 gobject_class->get_property = foo_igen_unknown_xml_tags_proxy_get_property;
24283 gobject_class->set_property = foo_igen_unknown_xml_tags_proxy_set_property;
24285 proxy_class = G_DBUS_PROXY_CLASS (klass);
24286 proxy_class->g_signal = foo_igen_unknown_xml_tags_proxy_g_signal;
24287 proxy_class->g_properties_changed = foo_igen_unknown_xml_tags_proxy_g_properties_changed;
24290 foo_igen_unknown_xml_tags_override_properties (gobject_class, 1);
24294 foo_igen_unknown_xml_tags_proxy_iface_init (FooiGenUnknownXmlTagsIface *iface)
24296 iface->get_some_property = foo_igen_unknown_xml_tags_proxy_get_some_property;
24300 * foo_igen_unknown_xml_tags_proxy_new:
24301 * @connection: A #GDBusConnection.
24302 * @flags: Flags from the #GDBusProxyFlags enumeration.
24303 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
24304 * @object_path: An object path.
24305 * @cancellable: (allow-none): A #GCancellable or %NULL.
24306 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
24307 * @user_data: User data to pass to @callback.
24309 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link>. See g_dbus_proxy_new() for more details.
24311 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
24312 * You can then call foo_igen_unknown_xml_tags_proxy_new_finish() to get the result of the operation.
24314 * See foo_igen_unknown_xml_tags_proxy_new_sync() for the synchronous, blocking version of this constructor.
24317 foo_igen_unknown_xml_tags_proxy_new (
24318 GDBusConnection *connection,
24319 GDBusProxyFlags flags,
24321 const gchar *object_path,
24322 GCancellable *cancellable,
24323 GAsyncReadyCallback callback,
24324 gpointer user_data)
24326 g_async_initable_new_async (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_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", "UnknownXmlTags", NULL);
24330 * foo_igen_unknown_xml_tags_proxy_new_finish:
24331 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_unknown_xml_tags_proxy_new().
24332 * @error: Return location for error or %NULL
24334 * Finishes an operation started with foo_igen_unknown_xml_tags_proxy_new().
24336 * Returns: (transfer full) (type FooiGenUnknownXmlTagsProxy): The constructed proxy object or %NULL if @error is set.
24338 FooiGenUnknownXmlTags *
24339 foo_igen_unknown_xml_tags_proxy_new_finish (
24344 GObject *source_object;
24345 source_object = g_async_result_get_source_object (res);
24346 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
24347 g_object_unref (source_object);
24349 return FOO_IGEN_UNKNOWN_XML_TAGS (ret);
24355 * foo_igen_unknown_xml_tags_proxy_new_sync:
24356 * @connection: A #GDBusConnection.
24357 * @flags: Flags from the #GDBusProxyFlags enumeration.
24358 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
24359 * @object_path: An object path.
24360 * @cancellable: (allow-none): A #GCancellable or %NULL.
24361 * @error: Return location for error or %NULL
24363 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link>. See g_dbus_proxy_new_sync() for more details.
24365 * The calling thread is blocked until a reply is received.
24367 * See foo_igen_unknown_xml_tags_proxy_new() for the asynchronous version of this constructor.
24369 * Returns: (transfer full) (type FooiGenUnknownXmlTagsProxy): The constructed proxy object or %NULL if @error is set.
24371 FooiGenUnknownXmlTags *
24372 foo_igen_unknown_xml_tags_proxy_new_sync (
24373 GDBusConnection *connection,
24374 GDBusProxyFlags flags,
24376 const gchar *object_path,
24377 GCancellable *cancellable,
24381 ret = g_initable_new (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "UnknownXmlTags", NULL);
24383 return FOO_IGEN_UNKNOWN_XML_TAGS (ret);
24390 * foo_igen_unknown_xml_tags_proxy_new_for_bus:
24391 * @bus_type: A #GBusType.
24392 * @flags: Flags from the #GDBusProxyFlags enumeration.
24393 * @name: A bus name (well-known or unique).
24394 * @object_path: An object path.
24395 * @cancellable: (allow-none): A #GCancellable or %NULL.
24396 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
24397 * @user_data: User data to pass to @callback.
24399 * Like foo_igen_unknown_xml_tags_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
24401 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
24402 * You can then call foo_igen_unknown_xml_tags_proxy_new_for_bus_finish() to get the result of the operation.
24404 * See foo_igen_unknown_xml_tags_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
24407 foo_igen_unknown_xml_tags_proxy_new_for_bus (
24409 GDBusProxyFlags flags,
24411 const gchar *object_path,
24412 GCancellable *cancellable,
24413 GAsyncReadyCallback callback,
24414 gpointer user_data)
24416 g_async_initable_new_async (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_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", "UnknownXmlTags", NULL);
24420 * foo_igen_unknown_xml_tags_proxy_new_for_bus_finish:
24421 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_unknown_xml_tags_proxy_new_for_bus().
24422 * @error: Return location for error or %NULL
24424 * Finishes an operation started with foo_igen_unknown_xml_tags_proxy_new_for_bus().
24426 * Returns: (transfer full) (type FooiGenUnknownXmlTagsProxy): The constructed proxy object or %NULL if @error is set.
24428 FooiGenUnknownXmlTags *
24429 foo_igen_unknown_xml_tags_proxy_new_for_bus_finish (
24434 GObject *source_object;
24435 source_object = g_async_result_get_source_object (res);
24436 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
24437 g_object_unref (source_object);
24439 return FOO_IGEN_UNKNOWN_XML_TAGS (ret);
24445 * foo_igen_unknown_xml_tags_proxy_new_for_bus_sync:
24446 * @bus_type: A #GBusType.
24447 * @flags: Flags from the #GDBusProxyFlags enumeration.
24448 * @name: A bus name (well-known or unique).
24449 * @object_path: An object path.
24450 * @cancellable: (allow-none): A #GCancellable or %NULL.
24451 * @error: Return location for error or %NULL
24453 * Like foo_igen_unknown_xml_tags_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
24455 * The calling thread is blocked until a reply is received.
24457 * See foo_igen_unknown_xml_tags_proxy_new_for_bus() for the asynchronous version of this constructor.
24459 * Returns: (transfer full) (type FooiGenUnknownXmlTagsProxy): The constructed proxy object or %NULL if @error is set.
24461 FooiGenUnknownXmlTags *
24462 foo_igen_unknown_xml_tags_proxy_new_for_bus_sync (
24464 GDBusProxyFlags flags,
24466 const gchar *object_path,
24467 GCancellable *cancellable,
24471 ret = g_initable_new (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "UnknownXmlTags", NULL);
24473 return FOO_IGEN_UNKNOWN_XML_TAGS (ret);
24479 /* ------------------------------------------------------------------------ */
24482 * FooiGenUnknownXmlTagsSkeleton:
24484 * The #FooiGenUnknownXmlTagsSkeleton structure contains only private data and should only be accessed using the provided API.
24488 * FooiGenUnknownXmlTagsSkeletonClass:
24489 * @parent_class: The parent class.
24491 * Class structure for #FooiGenUnknownXmlTagsSkeleton.
24494 struct _FooiGenUnknownXmlTagsSkeletonPrivate
24496 GValue *properties;
24497 GList *changed_properties;
24498 GSource *changed_properties_idle_source;
24499 GMainContext *context;
24504 _foo_igen_unknown_xml_tags_skeleton_handle_method_call (
24505 GDBusConnection *connection,
24506 const gchar *sender,
24507 const gchar *object_path,
24508 const gchar *interface_name,
24509 const gchar *method_name,
24510 GVariant *parameters,
24511 GDBusMethodInvocation *invocation,
24512 gpointer user_data)
24514 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (user_data);
24515 _ExtendedGDBusMethodInfo *info;
24523 GValue return_value = G_VALUE_INIT;
24524 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
24525 g_assert (info != NULL);
24526 num_params = g_variant_n_children (parameters);
24527 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
24529 g_value_init (¶mv[n], FOO_IGEN_TYPE_UNKNOWN_XML_TAGS);
24530 g_value_set_object (¶mv[n++], skeleton);
24531 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
24532 g_value_set_object (¶mv[n++], invocation);
24533 if (info->pass_fdlist)
24536 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
24537 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
24539 g_assert_not_reached ();
24542 g_variant_iter_init (&iter, parameters);
24543 while ((child = g_variant_iter_next_value (&iter)) != NULL)
24545 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
24546 if (arg_info->use_gvariant)
24548 g_value_init (¶mv[n], G_TYPE_VARIANT);
24549 g_value_set_variant (¶mv[n], child);
24553 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
24554 g_variant_unref (child);
24556 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_UNKNOWN_XML_TAGS);
24557 g_value_init (&return_value, G_TYPE_BOOLEAN);
24558 g_signal_emitv (paramv, signal_id, 0, &return_value);
24559 if (!g_value_get_boolean (&return_value))
24560 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
24561 g_value_unset (&return_value);
24562 for (n = 0; n < num_params + num_extra; n++)
24563 g_value_unset (¶mv[n]);
24568 _foo_igen_unknown_xml_tags_skeleton_handle_get_property (
24569 GDBusConnection *connection,
24570 const gchar *sender,
24571 const gchar *object_path,
24572 const gchar *interface_name,
24573 const gchar *property_name,
24575 gpointer user_data)
24577 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (user_data);
24578 GValue value = G_VALUE_INIT;
24580 _ExtendedGDBusPropertyInfo *info;
24583 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_unknown_xml_tags_interface_info, property_name);
24584 g_assert (info != NULL);
24585 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
24588 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
24592 g_value_init (&value, pspec->value_type);
24593 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
24594 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
24595 g_value_unset (&value);
24601 _foo_igen_unknown_xml_tags_skeleton_handle_set_property (
24602 GDBusConnection *connection,
24603 const gchar *sender,
24604 const gchar *object_path,
24605 const gchar *interface_name,
24606 const gchar *property_name,
24609 gpointer user_data)
24611 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (user_data);
24612 GValue value = G_VALUE_INIT;
24614 _ExtendedGDBusPropertyInfo *info;
24617 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_unknown_xml_tags_interface_info, property_name);
24618 g_assert (info != NULL);
24619 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
24622 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
24626 if (info->use_gvariant)
24627 g_value_set_variant (&value, variant);
24629 g_dbus_gvariant_to_gvalue (variant, &value);
24630 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
24631 g_value_unset (&value);
24637 static const GDBusInterfaceVTable _foo_igen_unknown_xml_tags_skeleton_vtable =
24639 _foo_igen_unknown_xml_tags_skeleton_handle_method_call,
24640 _foo_igen_unknown_xml_tags_skeleton_handle_get_property,
24641 _foo_igen_unknown_xml_tags_skeleton_handle_set_property
24644 static GDBusInterfaceInfo *
24645 foo_igen_unknown_xml_tags_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
24647 return foo_igen_unknown_xml_tags_interface_info ();
24650 static GDBusInterfaceVTable *
24651 foo_igen_unknown_xml_tags_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
24653 return (GDBusInterfaceVTable *) &_foo_igen_unknown_xml_tags_skeleton_vtable;
24657 foo_igen_unknown_xml_tags_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
24659 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (_skeleton);
24661 GVariantBuilder builder;
24663 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
24664 if (_foo_igen_unknown_xml_tags_interface_info.parent_struct.properties == NULL)
24666 for (n = 0; _foo_igen_unknown_xml_tags_interface_info.parent_struct.properties[n] != NULL; n++)
24668 GDBusPropertyInfo *info = _foo_igen_unknown_xml_tags_interface_info.parent_struct.properties[n];
24669 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
24672 value = _foo_igen_unknown_xml_tags_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "UnknownXmlTags", info->name, NULL, skeleton);
24675 g_variant_take_ref (value);
24676 g_variant_builder_add (&builder, "{sv}", info->name, value);
24677 g_variant_unref (value);
24682 return g_variant_builder_end (&builder);
24685 static gboolean _foo_igen_unknown_xml_tags_emit_changed (gpointer user_data);
24688 foo_igen_unknown_xml_tags_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
24690 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (_skeleton);
24691 gboolean emit_changed = FALSE;
24693 g_mutex_lock (&skeleton->priv->lock);
24694 if (skeleton->priv->changed_properties_idle_source != NULL)
24696 g_source_destroy (skeleton->priv->changed_properties_idle_source);
24697 skeleton->priv->changed_properties_idle_source = NULL;
24698 emit_changed = TRUE;
24700 g_mutex_unlock (&skeleton->priv->lock);
24703 _foo_igen_unknown_xml_tags_emit_changed (skeleton);
24707 _foo_igen_unknown_xml_tags_on_signal_some_signal (
24708 FooiGenUnknownXmlTags *object)
24710 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (object);
24712 GList *connections, *l;
24713 GVariant *signal_variant;
24714 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
24716 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
24717 for (l = connections; l != NULL; l = l->next)
24719 GDBusConnection *connection = l->data;
24720 g_dbus_connection_emit_signal (connection,
24721 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "UnknownXmlTags", "SomeSignal",
24722 signal_variant, NULL);
24724 g_variant_unref (signal_variant);
24725 g_list_free_full (connections, g_object_unref);
24728 static void foo_igen_unknown_xml_tags_skeleton_iface_init (FooiGenUnknownXmlTagsIface *iface);
24729 G_DEFINE_TYPE_WITH_CODE (FooiGenUnknownXmlTagsSkeleton, foo_igen_unknown_xml_tags_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
24730 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS, foo_igen_unknown_xml_tags_skeleton_iface_init));
24733 foo_igen_unknown_xml_tags_skeleton_finalize (GObject *object)
24735 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (object);
24737 for (n = 0; n < 1; n++)
24738 g_value_unset (&skeleton->priv->properties[n]);
24739 g_free (skeleton->priv->properties);
24740 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
24741 if (skeleton->priv->changed_properties_idle_source != NULL)
24742 g_source_destroy (skeleton->priv->changed_properties_idle_source);
24743 g_main_context_unref (skeleton->priv->context);
24744 g_mutex_clear (&skeleton->priv->lock);
24745 G_OBJECT_CLASS (foo_igen_unknown_xml_tags_skeleton_parent_class)->finalize (object);
24749 foo_igen_unknown_xml_tags_skeleton_get_property (GObject *object,
24754 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (object);
24755 g_assert (prop_id != 0 && prop_id - 1 < 1);
24756 g_mutex_lock (&skeleton->priv->lock);
24757 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
24758 g_mutex_unlock (&skeleton->priv->lock);
24762 _foo_igen_unknown_xml_tags_emit_changed (gpointer user_data)
24764 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (user_data);
24766 GVariantBuilder builder;
24767 GVariantBuilder invalidated_builder;
24770 g_mutex_lock (&skeleton->priv->lock);
24771 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
24772 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
24773 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
24775 ChangedProperty *cp = l->data;
24777 const GValue *cur_value;
24779 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
24780 if (!_g_value_equal (cur_value, &cp->orig_value))
24782 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
24783 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
24784 g_variant_unref (variant);
24788 if (num_changes > 0)
24790 GList *connections, *l;
24791 GVariant *signal_variant;
24792 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "UnknownXmlTags",
24793 &builder, &invalidated_builder));
24794 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
24795 for (l = connections; l != NULL; l = l->next)
24797 GDBusConnection *connection = l->data;
24799 g_dbus_connection_emit_signal (connection,
24800 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
24801 "org.freedesktop.DBus.Properties",
24802 "PropertiesChanged",
24806 g_variant_unref (signal_variant);
24807 g_list_free_full (connections, g_object_unref);
24811 g_variant_builder_clear (&builder);
24812 g_variant_builder_clear (&invalidated_builder);
24814 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
24815 skeleton->priv->changed_properties = NULL;
24816 skeleton->priv->changed_properties_idle_source = NULL;
24817 g_mutex_unlock (&skeleton->priv->lock);
24822 _foo_igen_unknown_xml_tags_schedule_emit_changed (FooiGenUnknownXmlTagsSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
24824 ChangedProperty *cp;
24827 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
24829 ChangedProperty *i_cp = l->data;
24830 if (i_cp->info == info)
24838 cp = g_new0 (ChangedProperty, 1);
24839 cp->prop_id = prop_id;
24841 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
24842 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
24843 g_value_copy (orig_value, &cp->orig_value);
24848 foo_igen_unknown_xml_tags_skeleton_notify (GObject *object,
24851 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (object);
24852 g_mutex_lock (&skeleton->priv->lock);
24853 if (skeleton->priv->changed_properties != NULL &&
24854 skeleton->priv->changed_properties_idle_source == NULL)
24856 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
24857 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
24858 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _foo_igen_unknown_xml_tags_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
24859 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
24860 g_source_unref (skeleton->priv->changed_properties_idle_source);
24862 g_mutex_unlock (&skeleton->priv->lock);
24866 foo_igen_unknown_xml_tags_skeleton_set_property (GObject *object,
24868 const GValue *value,
24871 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (object);
24872 g_assert (prop_id != 0 && prop_id - 1 < 1);
24873 g_mutex_lock (&skeleton->priv->lock);
24874 g_object_freeze_notify (object);
24875 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
24877 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
24878 _foo_igen_unknown_xml_tags_schedule_emit_changed (skeleton, _foo_igen_unknown_xml_tags_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
24879 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
24880 g_object_notify_by_pspec (object, pspec);
24882 g_mutex_unlock (&skeleton->priv->lock);
24883 g_object_thaw_notify (object);
24887 foo_igen_unknown_xml_tags_skeleton_init (FooiGenUnknownXmlTagsSkeleton *skeleton)
24889 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_SKELETON, FooiGenUnknownXmlTagsSkeletonPrivate);
24890 g_mutex_init (&skeleton->priv->lock);
24891 skeleton->priv->context = g_main_context_ref_thread_default ();
24892 skeleton->priv->properties = g_new0 (GValue, 1);
24893 g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
24896 static const gchar *
24897 foo_igen_unknown_xml_tags_skeleton_get_some_property (FooiGenUnknownXmlTags *object)
24899 FooiGenUnknownXmlTagsSkeleton *skeleton = FOO_IGEN_UNKNOWN_XML_TAGS_SKELETON (object);
24900 const gchar *value;
24901 g_mutex_lock (&skeleton->priv->lock);
24902 value = g_value_get_string (&(skeleton->priv->properties[0]));
24903 g_mutex_unlock (&skeleton->priv->lock);
24908 foo_igen_unknown_xml_tags_skeleton_class_init (FooiGenUnknownXmlTagsSkeletonClass *klass)
24910 GObjectClass *gobject_class;
24911 GDBusInterfaceSkeletonClass *skeleton_class;
24913 g_type_class_add_private (klass, sizeof (FooiGenUnknownXmlTagsSkeletonPrivate));
24915 gobject_class = G_OBJECT_CLASS (klass);
24916 gobject_class->finalize = foo_igen_unknown_xml_tags_skeleton_finalize;
24917 gobject_class->get_property = foo_igen_unknown_xml_tags_skeleton_get_property;
24918 gobject_class->set_property = foo_igen_unknown_xml_tags_skeleton_set_property;
24919 gobject_class->notify = foo_igen_unknown_xml_tags_skeleton_notify;
24922 foo_igen_unknown_xml_tags_override_properties (gobject_class, 1);
24924 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
24925 skeleton_class->get_info = foo_igen_unknown_xml_tags_skeleton_dbus_interface_get_info;
24926 skeleton_class->get_properties = foo_igen_unknown_xml_tags_skeleton_dbus_interface_get_properties;
24927 skeleton_class->flush = foo_igen_unknown_xml_tags_skeleton_dbus_interface_flush;
24928 skeleton_class->get_vtable = foo_igen_unknown_xml_tags_skeleton_dbus_interface_get_vtable;
24932 foo_igen_unknown_xml_tags_skeleton_iface_init (FooiGenUnknownXmlTagsIface *iface)
24934 iface->some_signal = _foo_igen_unknown_xml_tags_on_signal_some_signal;
24935 iface->get_some_property = foo_igen_unknown_xml_tags_skeleton_get_some_property;
24939 * foo_igen_unknown_xml_tags_skeleton_new:
24941 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link>.
24943 * Returns: (transfer full) (type FooiGenUnknownXmlTagsSkeleton): The skeleton object.
24945 FooiGenUnknownXmlTags *
24946 foo_igen_unknown_xml_tags_skeleton_new (void)
24948 return FOO_IGEN_UNKNOWN_XML_TAGS (g_object_new (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_SKELETON, NULL));
24951 /* ------------------------------------------------------------------------
24952 * Code for interface FDPassing
24953 * ------------------------------------------------------------------------
24957 * SECTION:FooiGenFDPassing
24958 * @title: FooiGenFDPassing
24959 * @short_description: Generated C code for the FDPassing D-Bus interface
24961 * This section contains code for working with the <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link> D-Bus interface in C.
24964 /* ---- Introspection data for FDPassing ---- */
24966 static const _ExtendedGDBusArgInfo _foo_igen_fdpassing_method_info_hello_fd_IN_ARG_greeting =
24977 static const _ExtendedGDBusArgInfo * const _foo_igen_fdpassing_method_info_hello_fd_IN_ARG_pointers[] =
24979 &_foo_igen_fdpassing_method_info_hello_fd_IN_ARG_greeting,
24983 static const _ExtendedGDBusArgInfo _foo_igen_fdpassing_method_info_hello_fd_OUT_ARG_response =
24994 static const _ExtendedGDBusArgInfo * const _foo_igen_fdpassing_method_info_hello_fd_OUT_ARG_pointers[] =
24996 &_foo_igen_fdpassing_method_info_hello_fd_OUT_ARG_response,
25000 static const _ExtendedGDBusMethodInfo _foo_igen_fdpassing_method_info_hello_fd =
25005 (GDBusArgInfo **) &_foo_igen_fdpassing_method_info_hello_fd_IN_ARG_pointers,
25006 (GDBusArgInfo **) &_foo_igen_fdpassing_method_info_hello_fd_OUT_ARG_pointers,
25013 static const _ExtendedGDBusMethodInfo * const _foo_igen_fdpassing_method_info_pointers[] =
25015 &_foo_igen_fdpassing_method_info_hello_fd,
25019 static const _ExtendedGDBusInterfaceInfo _foo_igen_fdpassing_interface_info =
25024 (GDBusMethodInfo **) &_foo_igen_fdpassing_method_info_pointers,
25034 * foo_igen_fdpassing_interface_info:
25036 * Gets a machine-readable description of the <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link> D-Bus interface.
25038 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
25040 GDBusInterfaceInfo *
25041 foo_igen_fdpassing_interface_info (void)
25043 return (GDBusInterfaceInfo *) &_foo_igen_fdpassing_interface_info;
25047 * foo_igen_fdpassing_override_properties:
25048 * @klass: The class structure for a #GObject<!-- -->-derived class.
25049 * @property_id_begin: The property id to assign to the first overridden property.
25051 * Overrides all #GObject properties in the #FooiGenFDPassing interface for a concrete class.
25052 * The properties are overridden in the order they are defined.
25054 * Returns: The last property id.
25057 foo_igen_fdpassing_override_properties (GObjectClass *klass, guint property_id_begin)
25059 return property_id_begin - 1;
25065 * FooiGenFDPassing:
25067 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link>.
25071 * FooiGenFDPassingIface:
25072 * @parent_iface: The parent interface.
25073 * @handle_hello_fd: Handler for the #FooiGenFDPassing::handle-hello-fd signal.
25075 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link>.
25079 foo_igen_fdpassing_default_init (FooiGenFDPassingIface *iface)
25081 /* GObject signals for incoming D-Bus method calls: */
25083 * FooiGenFDPassing::handle-hello-fd:
25084 * @object: A #FooiGenFDPassing.
25085 * @invocation: A #GDBusMethodInvocation.
25086 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
25087 * @arg_greeting: Argument passed by remote caller.
25089 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-FDPassing.HelloFD">HelloFD()</link> D-Bus method.
25091 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call foo_igen_fdpassing_complete_hello_fd() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
25093 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
25095 g_signal_new ("handle-hello-fd",
25096 G_TYPE_FROM_INTERFACE (iface),
25098 G_STRUCT_OFFSET (FooiGenFDPassingIface, handle_hello_fd),
25099 g_signal_accumulator_true_handled,
25101 g_cclosure_marshal_generic,
25104 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING);
25108 typedef FooiGenFDPassingIface FooiGenFDPassingInterface;
25109 G_DEFINE_INTERFACE (FooiGenFDPassing, foo_igen_fdpassing, G_TYPE_OBJECT);
25112 * foo_igen_fdpassing_call_hello_fd:
25113 * @proxy: A #FooiGenFDPassingProxy.
25114 * @arg_greeting: Argument to pass with the method invocation.
25115 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
25116 * @cancellable: (allow-none): A #GCancellable or %NULL.
25117 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
25118 * @user_data: User data to pass to @callback.
25120 * Asynchronously invokes the <link linkend="gdbus-method-FDPassing.HelloFD">HelloFD()</link> D-Bus method on @proxy.
25121 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
25122 * You can then call foo_igen_fdpassing_call_hello_fd_finish() to get the result of the operation.
25124 * See foo_igen_fdpassing_call_hello_fd_sync() for the synchronous, blocking version of this method.
25127 foo_igen_fdpassing_call_hello_fd (
25128 FooiGenFDPassing *proxy,
25129 const gchar *arg_greeting,
25130 GUnixFDList *fd_list,
25131 GCancellable *cancellable,
25132 GAsyncReadyCallback callback,
25133 gpointer user_data)
25135 g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
25137 g_variant_new ("(s)",
25139 G_DBUS_CALL_FLAGS_NONE,
25148 * foo_igen_fdpassing_call_hello_fd_finish:
25149 * @proxy: A #FooiGenFDPassingProxy.
25150 * @out_response: (out): Return location for return parameter or %NULL to ignore.
25151 * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
25152 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_fdpassing_call_hello_fd().
25153 * @error: Return location for error or %NULL.
25155 * Finishes an operation started with foo_igen_fdpassing_call_hello_fd().
25157 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
25160 foo_igen_fdpassing_call_hello_fd_finish (
25161 FooiGenFDPassing *proxy,
25162 gchar **out_response,
25163 GUnixFDList **out_fd_list,
25168 _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
25171 g_variant_get (_ret,
25174 g_variant_unref (_ret);
25176 return _ret != NULL;
25180 * foo_igen_fdpassing_call_hello_fd_sync:
25181 * @proxy: A #FooiGenFDPassingProxy.
25182 * @arg_greeting: Argument to pass with the method invocation.
25183 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
25184 * @out_response: (out): Return location for return parameter or %NULL to ignore.
25185 * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
25186 * @cancellable: (allow-none): A #GCancellable or %NULL.
25187 * @error: Return location for error or %NULL.
25189 * Synchronously invokes the <link linkend="gdbus-method-FDPassing.HelloFD">HelloFD()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
25191 * See foo_igen_fdpassing_call_hello_fd() for the asynchronous version of this method.
25193 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
25196 foo_igen_fdpassing_call_hello_fd_sync (
25197 FooiGenFDPassing *proxy,
25198 const gchar *arg_greeting,
25199 GUnixFDList *fd_list,
25200 gchar **out_response,
25201 GUnixFDList **out_fd_list,
25202 GCancellable *cancellable,
25206 _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
25208 g_variant_new ("(s)",
25210 G_DBUS_CALL_FLAGS_NONE,
25218 g_variant_get (_ret,
25221 g_variant_unref (_ret);
25223 return _ret != NULL;
25227 * foo_igen_fdpassing_complete_hello_fd:
25228 * @object: A #FooiGenFDPassing.
25229 * @invocation: (transfer full): A #GDBusMethodInvocation.
25230 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
25231 * @response: Parameter to return.
25233 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-FDPassing.HelloFD">HelloFD()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
25235 * This method will free @invocation, you cannot use it afterwards.
25238 foo_igen_fdpassing_complete_hello_fd (
25239 FooiGenFDPassing *object,
25240 GDBusMethodInvocation *invocation,
25241 GUnixFDList *fd_list,
25242 const gchar *response)
25244 g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
25245 g_variant_new ("(s)",
25250 /* ------------------------------------------------------------------------ */
25253 * FooiGenFDPassingProxy:
25255 * The #FooiGenFDPassingProxy structure contains only private data and should only be accessed using the provided API.
25259 * FooiGenFDPassingProxyClass:
25260 * @parent_class: The parent class.
25262 * Class structure for #FooiGenFDPassingProxy.
25265 struct _FooiGenFDPassingProxyPrivate
25270 static void foo_igen_fdpassing_proxy_iface_init (FooiGenFDPassingIface *iface);
25272 G_DEFINE_TYPE_WITH_CODE (FooiGenFDPassingProxy, foo_igen_fdpassing_proxy, G_TYPE_DBUS_PROXY,
25273 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_FDPASSING, foo_igen_fdpassing_proxy_iface_init));
25276 foo_igen_fdpassing_proxy_finalize (GObject *object)
25278 FooiGenFDPassingProxy *proxy = FOO_IGEN_FDPASSING_PROXY (object);
25279 g_datalist_clear (&proxy->priv->qdata);
25280 G_OBJECT_CLASS (foo_igen_fdpassing_proxy_parent_class)->finalize (object);
25284 foo_igen_fdpassing_proxy_get_property (GObject *object,
25292 foo_igen_fdpassing_proxy_set_property (GObject *object,
25294 const GValue *value,
25300 foo_igen_fdpassing_proxy_g_signal (GDBusProxy *proxy,
25301 const gchar *sender_name,
25302 const gchar *signal_name,
25303 GVariant *parameters)
25305 _ExtendedGDBusSignalInfo *info;
25312 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_foo_igen_fdpassing_interface_info, signal_name);
25315 num_params = g_variant_n_children (parameters);
25316 paramv = g_new0 (GValue, num_params + 1);
25317 g_value_init (¶mv[0], FOO_IGEN_TYPE_FDPASSING);
25318 g_value_set_object (¶mv[0], proxy);
25319 g_variant_iter_init (&iter, parameters);
25321 while ((child = g_variant_iter_next_value (&iter)) != NULL)
25323 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
25324 if (arg_info->use_gvariant)
25326 g_value_init (¶mv[n], G_TYPE_VARIANT);
25327 g_value_set_variant (¶mv[n], child);
25331 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
25332 g_variant_unref (child);
25334 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_FDPASSING);
25335 g_signal_emitv (paramv, signal_id, 0, NULL);
25336 for (n = 0; n < num_params + 1; n++)
25337 g_value_unset (¶mv[n]);
25342 foo_igen_fdpassing_proxy_g_properties_changed (GDBusProxy *_proxy,
25343 GVariant *changed_properties,
25344 const gchar *const *invalidated_properties)
25346 FooiGenFDPassingProxy *proxy = FOO_IGEN_FDPASSING_PROXY (_proxy);
25349 GVariantIter *iter;
25350 _ExtendedGDBusPropertyInfo *info;
25351 g_variant_get (changed_properties, "a{sv}", &iter);
25352 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
25354 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_fdpassing_interface_info, key);
25355 g_datalist_remove_data (&proxy->priv->qdata, key);
25357 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
25359 g_variant_iter_free (iter);
25360 for (n = 0; invalidated_properties[n] != NULL; n++)
25362 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_fdpassing_interface_info, invalidated_properties[n]);
25363 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
25365 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
25370 foo_igen_fdpassing_proxy_init (FooiGenFDPassingProxy *proxy)
25372 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, FOO_IGEN_TYPE_FDPASSING_PROXY, FooiGenFDPassingProxyPrivate);
25373 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), foo_igen_fdpassing_interface_info ());
25377 foo_igen_fdpassing_proxy_class_init (FooiGenFDPassingProxyClass *klass)
25379 GObjectClass *gobject_class;
25380 GDBusProxyClass *proxy_class;
25382 g_type_class_add_private (klass, sizeof (FooiGenFDPassingProxyPrivate));
25384 gobject_class = G_OBJECT_CLASS (klass);
25385 gobject_class->finalize = foo_igen_fdpassing_proxy_finalize;
25386 gobject_class->get_property = foo_igen_fdpassing_proxy_get_property;
25387 gobject_class->set_property = foo_igen_fdpassing_proxy_set_property;
25389 proxy_class = G_DBUS_PROXY_CLASS (klass);
25390 proxy_class->g_signal = foo_igen_fdpassing_proxy_g_signal;
25391 proxy_class->g_properties_changed = foo_igen_fdpassing_proxy_g_properties_changed;
25396 foo_igen_fdpassing_proxy_iface_init (FooiGenFDPassingIface *iface)
25401 * foo_igen_fdpassing_proxy_new:
25402 * @connection: A #GDBusConnection.
25403 * @flags: Flags from the #GDBusProxyFlags enumeration.
25404 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
25405 * @object_path: An object path.
25406 * @cancellable: (allow-none): A #GCancellable or %NULL.
25407 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
25408 * @user_data: User data to pass to @callback.
25410 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link>. See g_dbus_proxy_new() for more details.
25412 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
25413 * You can then call foo_igen_fdpassing_proxy_new_finish() to get the result of the operation.
25415 * See foo_igen_fdpassing_proxy_new_sync() for the synchronous, blocking version of this constructor.
25418 foo_igen_fdpassing_proxy_new (
25419 GDBusConnection *connection,
25420 GDBusProxyFlags flags,
25422 const gchar *object_path,
25423 GCancellable *cancellable,
25424 GAsyncReadyCallback callback,
25425 gpointer user_data)
25427 g_async_initable_new_async (FOO_IGEN_TYPE_FDPASSING_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", "FDPassing", NULL);
25431 * foo_igen_fdpassing_proxy_new_finish:
25432 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_fdpassing_proxy_new().
25433 * @error: Return location for error or %NULL
25435 * Finishes an operation started with foo_igen_fdpassing_proxy_new().
25437 * Returns: (transfer full) (type FooiGenFDPassingProxy): The constructed proxy object or %NULL if @error is set.
25440 foo_igen_fdpassing_proxy_new_finish (
25445 GObject *source_object;
25446 source_object = g_async_result_get_source_object (res);
25447 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
25448 g_object_unref (source_object);
25450 return FOO_IGEN_FDPASSING (ret);
25456 * foo_igen_fdpassing_proxy_new_sync:
25457 * @connection: A #GDBusConnection.
25458 * @flags: Flags from the #GDBusProxyFlags enumeration.
25459 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
25460 * @object_path: An object path.
25461 * @cancellable: (allow-none): A #GCancellable or %NULL.
25462 * @error: Return location for error or %NULL
25464 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link>. See g_dbus_proxy_new_sync() for more details.
25466 * The calling thread is blocked until a reply is received.
25468 * See foo_igen_fdpassing_proxy_new() for the asynchronous version of this constructor.
25470 * Returns: (transfer full) (type FooiGenFDPassingProxy): The constructed proxy object or %NULL if @error is set.
25473 foo_igen_fdpassing_proxy_new_sync (
25474 GDBusConnection *connection,
25475 GDBusProxyFlags flags,
25477 const gchar *object_path,
25478 GCancellable *cancellable,
25482 ret = g_initable_new (FOO_IGEN_TYPE_FDPASSING_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "FDPassing", NULL);
25484 return FOO_IGEN_FDPASSING (ret);
25491 * foo_igen_fdpassing_proxy_new_for_bus:
25492 * @bus_type: A #GBusType.
25493 * @flags: Flags from the #GDBusProxyFlags enumeration.
25494 * @name: A bus name (well-known or unique).
25495 * @object_path: An object path.
25496 * @cancellable: (allow-none): A #GCancellable or %NULL.
25497 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
25498 * @user_data: User data to pass to @callback.
25500 * Like foo_igen_fdpassing_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
25502 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
25503 * You can then call foo_igen_fdpassing_proxy_new_for_bus_finish() to get the result of the operation.
25505 * See foo_igen_fdpassing_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
25508 foo_igen_fdpassing_proxy_new_for_bus (
25510 GDBusProxyFlags flags,
25512 const gchar *object_path,
25513 GCancellable *cancellable,
25514 GAsyncReadyCallback callback,
25515 gpointer user_data)
25517 g_async_initable_new_async (FOO_IGEN_TYPE_FDPASSING_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", "FDPassing", NULL);
25521 * foo_igen_fdpassing_proxy_new_for_bus_finish:
25522 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_fdpassing_proxy_new_for_bus().
25523 * @error: Return location for error or %NULL
25525 * Finishes an operation started with foo_igen_fdpassing_proxy_new_for_bus().
25527 * Returns: (transfer full) (type FooiGenFDPassingProxy): The constructed proxy object or %NULL if @error is set.
25530 foo_igen_fdpassing_proxy_new_for_bus_finish (
25535 GObject *source_object;
25536 source_object = g_async_result_get_source_object (res);
25537 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
25538 g_object_unref (source_object);
25540 return FOO_IGEN_FDPASSING (ret);
25546 * foo_igen_fdpassing_proxy_new_for_bus_sync:
25547 * @bus_type: A #GBusType.
25548 * @flags: Flags from the #GDBusProxyFlags enumeration.
25549 * @name: A bus name (well-known or unique).
25550 * @object_path: An object path.
25551 * @cancellable: (allow-none): A #GCancellable or %NULL.
25552 * @error: Return location for error or %NULL
25554 * Like foo_igen_fdpassing_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
25556 * The calling thread is blocked until a reply is received.
25558 * See foo_igen_fdpassing_proxy_new_for_bus() for the asynchronous version of this constructor.
25560 * Returns: (transfer full) (type FooiGenFDPassingProxy): The constructed proxy object or %NULL if @error is set.
25563 foo_igen_fdpassing_proxy_new_for_bus_sync (
25565 GDBusProxyFlags flags,
25567 const gchar *object_path,
25568 GCancellable *cancellable,
25572 ret = g_initable_new (FOO_IGEN_TYPE_FDPASSING_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "FDPassing", NULL);
25574 return FOO_IGEN_FDPASSING (ret);
25580 /* ------------------------------------------------------------------------ */
25583 * FooiGenFDPassingSkeleton:
25585 * The #FooiGenFDPassingSkeleton structure contains only private data and should only be accessed using the provided API.
25589 * FooiGenFDPassingSkeletonClass:
25590 * @parent_class: The parent class.
25592 * Class structure for #FooiGenFDPassingSkeleton.
25595 struct _FooiGenFDPassingSkeletonPrivate
25597 GValue *properties;
25598 GList *changed_properties;
25599 GSource *changed_properties_idle_source;
25600 GMainContext *context;
25605 _foo_igen_fdpassing_skeleton_handle_method_call (
25606 GDBusConnection *connection,
25607 const gchar *sender,
25608 const gchar *object_path,
25609 const gchar *interface_name,
25610 const gchar *method_name,
25611 GVariant *parameters,
25612 GDBusMethodInvocation *invocation,
25613 gpointer user_data)
25615 FooiGenFDPassingSkeleton *skeleton = FOO_IGEN_FDPASSING_SKELETON (user_data);
25616 _ExtendedGDBusMethodInfo *info;
25624 GValue return_value = G_VALUE_INIT;
25625 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
25626 g_assert (info != NULL);
25627 num_params = g_variant_n_children (parameters);
25628 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
25630 g_value_init (¶mv[n], FOO_IGEN_TYPE_FDPASSING);
25631 g_value_set_object (¶mv[n++], skeleton);
25632 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
25633 g_value_set_object (¶mv[n++], invocation);
25634 if (info->pass_fdlist)
25637 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
25638 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
25640 g_assert_not_reached ();
25643 g_variant_iter_init (&iter, parameters);
25644 while ((child = g_variant_iter_next_value (&iter)) != NULL)
25646 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
25647 if (arg_info->use_gvariant)
25649 g_value_init (¶mv[n], G_TYPE_VARIANT);
25650 g_value_set_variant (¶mv[n], child);
25654 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
25655 g_variant_unref (child);
25657 signal_id = g_signal_lookup (info->signal_name, FOO_IGEN_TYPE_FDPASSING);
25658 g_value_init (&return_value, G_TYPE_BOOLEAN);
25659 g_signal_emitv (paramv, signal_id, 0, &return_value);
25660 if (!g_value_get_boolean (&return_value))
25661 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
25662 g_value_unset (&return_value);
25663 for (n = 0; n < num_params + num_extra; n++)
25664 g_value_unset (¶mv[n]);
25669 _foo_igen_fdpassing_skeleton_handle_get_property (
25670 GDBusConnection *connection,
25671 const gchar *sender,
25672 const gchar *object_path,
25673 const gchar *interface_name,
25674 const gchar *property_name,
25676 gpointer user_data)
25678 FooiGenFDPassingSkeleton *skeleton = FOO_IGEN_FDPASSING_SKELETON (user_data);
25679 GValue value = G_VALUE_INIT;
25681 _ExtendedGDBusPropertyInfo *info;
25684 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_fdpassing_interface_info, property_name);
25685 g_assert (info != NULL);
25686 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
25689 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
25693 g_value_init (&value, pspec->value_type);
25694 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
25695 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
25696 g_value_unset (&value);
25702 _foo_igen_fdpassing_skeleton_handle_set_property (
25703 GDBusConnection *connection,
25704 const gchar *sender,
25705 const gchar *object_path,
25706 const gchar *interface_name,
25707 const gchar *property_name,
25710 gpointer user_data)
25712 FooiGenFDPassingSkeleton *skeleton = FOO_IGEN_FDPASSING_SKELETON (user_data);
25713 GValue value = G_VALUE_INIT;
25715 _ExtendedGDBusPropertyInfo *info;
25718 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_foo_igen_fdpassing_interface_info, property_name);
25719 g_assert (info != NULL);
25720 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
25723 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
25727 if (info->use_gvariant)
25728 g_value_set_variant (&value, variant);
25730 g_dbus_gvariant_to_gvalue (variant, &value);
25731 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
25732 g_value_unset (&value);
25738 static const GDBusInterfaceVTable _foo_igen_fdpassing_skeleton_vtable =
25740 _foo_igen_fdpassing_skeleton_handle_method_call,
25741 _foo_igen_fdpassing_skeleton_handle_get_property,
25742 _foo_igen_fdpassing_skeleton_handle_set_property
25745 static GDBusInterfaceInfo *
25746 foo_igen_fdpassing_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
25748 return foo_igen_fdpassing_interface_info ();
25751 static GDBusInterfaceVTable *
25752 foo_igen_fdpassing_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
25754 return (GDBusInterfaceVTable *) &_foo_igen_fdpassing_skeleton_vtable;
25758 foo_igen_fdpassing_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
25760 FooiGenFDPassingSkeleton *skeleton = FOO_IGEN_FDPASSING_SKELETON (_skeleton);
25762 GVariantBuilder builder;
25764 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
25765 if (_foo_igen_fdpassing_interface_info.parent_struct.properties == NULL)
25767 for (n = 0; _foo_igen_fdpassing_interface_info.parent_struct.properties[n] != NULL; n++)
25769 GDBusPropertyInfo *info = _foo_igen_fdpassing_interface_info.parent_struct.properties[n];
25770 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
25773 value = _foo_igen_fdpassing_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "FDPassing", info->name, NULL, skeleton);
25776 g_variant_take_ref (value);
25777 g_variant_builder_add (&builder, "{sv}", info->name, value);
25778 g_variant_unref (value);
25783 return g_variant_builder_end (&builder);
25787 foo_igen_fdpassing_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
25791 static void foo_igen_fdpassing_skeleton_iface_init (FooiGenFDPassingIface *iface);
25792 G_DEFINE_TYPE_WITH_CODE (FooiGenFDPassingSkeleton, foo_igen_fdpassing_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
25793 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_FDPASSING, foo_igen_fdpassing_skeleton_iface_init));
25796 foo_igen_fdpassing_skeleton_finalize (GObject *object)
25798 FooiGenFDPassingSkeleton *skeleton = FOO_IGEN_FDPASSING_SKELETON (object);
25799 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
25800 if (skeleton->priv->changed_properties_idle_source != NULL)
25801 g_source_destroy (skeleton->priv->changed_properties_idle_source);
25802 g_main_context_unref (skeleton->priv->context);
25803 g_mutex_clear (&skeleton->priv->lock);
25804 G_OBJECT_CLASS (foo_igen_fdpassing_skeleton_parent_class)->finalize (object);
25808 foo_igen_fdpassing_skeleton_init (FooiGenFDPassingSkeleton *skeleton)
25810 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, FOO_IGEN_TYPE_FDPASSING_SKELETON, FooiGenFDPassingSkeletonPrivate);
25811 g_mutex_init (&skeleton->priv->lock);
25812 skeleton->priv->context = g_main_context_ref_thread_default ();
25816 foo_igen_fdpassing_skeleton_class_init (FooiGenFDPassingSkeletonClass *klass)
25818 GObjectClass *gobject_class;
25819 GDBusInterfaceSkeletonClass *skeleton_class;
25821 g_type_class_add_private (klass, sizeof (FooiGenFDPassingSkeletonPrivate));
25823 gobject_class = G_OBJECT_CLASS (klass);
25824 gobject_class->finalize = foo_igen_fdpassing_skeleton_finalize;
25826 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
25827 skeleton_class->get_info = foo_igen_fdpassing_skeleton_dbus_interface_get_info;
25828 skeleton_class->get_properties = foo_igen_fdpassing_skeleton_dbus_interface_get_properties;
25829 skeleton_class->flush = foo_igen_fdpassing_skeleton_dbus_interface_flush;
25830 skeleton_class->get_vtable = foo_igen_fdpassing_skeleton_dbus_interface_get_vtable;
25834 foo_igen_fdpassing_skeleton_iface_init (FooiGenFDPassingIface *iface)
25839 * foo_igen_fdpassing_skeleton_new:
25841 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link>.
25843 * Returns: (transfer full) (type FooiGenFDPassingSkeleton): The skeleton object.
25846 foo_igen_fdpassing_skeleton_new (void)
25848 return FOO_IGEN_FDPASSING (g_object_new (FOO_IGEN_TYPE_FDPASSING_SKELETON, NULL));
25851 /* ------------------------------------------------------------------------
25852 * Code for Object, ObjectProxy and ObjectSkeleton
25853 * ------------------------------------------------------------------------
25857 * SECTION:FooiGenObject
25858 * @title: FooiGenObject
25859 * @short_description: Specialized GDBusObject types
25861 * This section contains the #FooiGenObject, #FooiGenObjectProxy, and #FooiGenObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces.
25867 * The #FooiGenObject type is a specialized container of interfaces.
25871 * FooiGenObjectIface:
25872 * @parent_iface: The parent interface.
25874 * Virtual table for the #FooiGenObject interface.
25878 foo_igen_object_default_init (FooiGenObjectIface *iface)
25881 * FooiGenObject:bar:
25883 * The #FooiGenBar instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link>, if any.
25885 * Connect to the #GObject::notify signal to get informed of property changes.
25887 g_object_interface_install_property (iface, g_param_spec_object ("bar", "bar", "bar", FOO_IGEN_TYPE_BAR, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25890 * FooiGenObject:bar-frobnicator:
25892 * The #FooiGenBarFrobnicator instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link>, if any.
25894 * Connect to the #GObject::notify signal to get informed of property changes.
25896 g_object_interface_install_property (iface, g_param_spec_object ("bar-frobnicator", "bar-frobnicator", "bar-frobnicator", FOO_IGEN_TYPE_BAR_FROBNICATOR, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25899 * FooiGenObject:baz:
25901 * The #FooiGenBaz instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link>, if any.
25903 * Connect to the #GObject::notify signal to get informed of property changes.
25905 g_object_interface_install_property (iface, g_param_spec_object ("baz", "baz", "baz", FOO_IGEN_TYPE_BAZ, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25908 * FooiGenObject:com-acme-coyote:
25910 * The #FooiGenComAcmeCoyote instance corresponding to the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link>, if any.
25912 * Connect to the #GObject::notify signal to get informed of property changes.
25914 g_object_interface_install_property (iface, g_param_spec_object ("com-acme-coyote", "com-acme-coyote", "com-acme-coyote", FOO_IGEN_TYPE_COM_ACME_COYOTE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25917 * FooiGenObject:rocket123:
25919 * The #FooiGenRocket123 instance corresponding to the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link>, if any.
25921 * Connect to the #GObject::notify signal to get informed of property changes.
25923 g_object_interface_install_property (iface, g_param_spec_object ("rocket123", "rocket123", "rocket123", FOO_IGEN_TYPE_ROCKET123, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25926 * FooiGenObject:bat:
25928 * The #FooiGenBat instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link>, if any.
25930 * Connect to the #GObject::notify signal to get informed of property changes.
25932 g_object_interface_install_property (iface, g_param_spec_object ("bat", "bat", "bat", FOO_IGEN_TYPE_BAT, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25935 * FooiGenObject:authorize:
25937 * The #FooiGenAuthorize instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link>, if any.
25939 * Connect to the #GObject::notify signal to get informed of property changes.
25941 g_object_interface_install_property (iface, g_param_spec_object ("authorize", "authorize", "authorize", FOO_IGEN_TYPE_AUTHORIZE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25944 * FooiGenObject:method-threads:
25946 * The #FooiGenMethodThreads instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link>, if any.
25948 * Connect to the #GObject::notify signal to get informed of property changes.
25950 g_object_interface_install_property (iface, g_param_spec_object ("method-threads", "method-threads", "method-threads", FOO_IGEN_TYPE_METHOD_THREADS, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25953 * FooiGenObject:inline-docs:
25955 * The #FooiGenInlineDocs instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link>, if any.
25957 * Connect to the #GObject::notify signal to get informed of property changes.
25959 g_object_interface_install_property (iface, g_param_spec_object ("inline-docs", "inline-docs", "inline-docs", FOO_IGEN_TYPE_INLINE_DOCS, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25962 * FooiGenObject:changing-interface-v1:
25964 * The #FooiGenChangingInterfaceV1 instance corresponding to the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link>, if any.
25966 * Connect to the #GObject::notify signal to get informed of property changes.
25968 g_object_interface_install_property (iface, g_param_spec_object ("changing-interface-v1", "changing-interface-v1", "changing-interface-v1", FOO_IGEN_TYPE_CHANGING_INTERFACE_V1, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25971 * FooiGenObject:changing-interface-v2:
25973 * The #FooiGenChangingInterfaceV2 instance corresponding to the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link>, if any.
25975 * Connect to the #GObject::notify signal to get informed of property changes.
25979 g_object_interface_install_property (iface, g_param_spec_object ("changing-interface-v2", "changing-interface-v2", "changing-interface-v2", FOO_IGEN_TYPE_CHANGING_INTERFACE_V2, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25982 * FooiGenObject:changing-interface-v10:
25984 * The #FooiGenChangingInterfaceV10 instance corresponding to the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link>, if any.
25986 * Connect to the #GObject::notify signal to get informed of property changes.
25990 g_object_interface_install_property (iface, g_param_spec_object ("changing-interface-v10", "changing-interface-v10", "changing-interface-v10", FOO_IGEN_TYPE_CHANGING_INTERFACE_V10, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
25993 * FooiGenObject:test-ugly-case-interface:
25995 * The #FooiGenTesTuglyCASEInterface instance corresponding to the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link>, if any.
25997 * Connect to the #GObject::notify signal to get informed of property changes.
25999 g_object_interface_install_property (iface, g_param_spec_object ("test-ugly-case-interface", "test-ugly-case-interface", "test-ugly-case-interface", FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
26002 * FooiGenObject:oldie-interface:
26004 * The #FooiGenOldieInterface instance corresponding to the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link>, if any.
26006 * Connect to the #GObject::notify signal to get informed of property changes.
26008 * Deprecated: The D-Bus interface has been deprecated.
26010 g_object_interface_install_property (iface, g_param_spec_object ("oldie-interface", "oldie-interface", "oldie-interface", FOO_IGEN_TYPE_OLDIE_INTERFACE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
26013 * FooiGenObject:unknown-xml-tags:
26015 * The #FooiGenUnknownXmlTags instance corresponding to the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link>, if any.
26017 * Connect to the #GObject::notify signal to get informed of property changes.
26019 g_object_interface_install_property (iface, g_param_spec_object ("unknown-xml-tags", "unknown-xml-tags", "unknown-xml-tags", FOO_IGEN_TYPE_UNKNOWN_XML_TAGS, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
26022 * FooiGenObject:fdpassing:
26024 * The #FooiGenFDPassing instance corresponding to the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link>, if any.
26026 * Connect to the #GObject::notify signal to get informed of property changes.
26028 g_object_interface_install_property (iface, g_param_spec_object ("fdpassing", "fdpassing", "fdpassing", FOO_IGEN_TYPE_FDPASSING, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
26032 typedef FooiGenObjectIface FooiGenObjectInterface;
26033 G_DEFINE_INTERFACE_WITH_CODE (FooiGenObject, foo_igen_object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT));
26036 * foo_igen_object_get_bar:
26037 * @object: A #FooiGenObject.
26039 * Gets the #FooiGenBar instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link> on @object, if any.
26041 * Returns: (transfer full): A #FooiGenBar that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26043 FooiGenBar *foo_igen_object_get_bar (FooiGenObject *object)
26045 GDBusInterface *ret;
26046 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar");
26049 return FOO_IGEN_BAR (ret);
26053 * foo_igen_object_get_bar_frobnicator:
26054 * @object: A #FooiGenObject.
26056 * Gets the #FooiGenBarFrobnicator instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link> on @object, if any.
26058 * Returns: (transfer full): A #FooiGenBarFrobnicator that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26060 FooiGenBarFrobnicator *foo_igen_object_get_bar_frobnicator (FooiGenObject *object)
26062 GDBusInterface *ret;
26063 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar.Frobnicator");
26066 return FOO_IGEN_BAR_FROBNICATOR (ret);
26070 * foo_igen_object_get_baz:
26071 * @object: A #FooiGenObject.
26073 * Gets the #FooiGenBaz instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link> on @object, if any.
26075 * Returns: (transfer full): A #FooiGenBaz that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26077 FooiGenBaz *foo_igen_object_get_baz (FooiGenObject *object)
26079 GDBusInterface *ret;
26080 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Baz");
26083 return FOO_IGEN_BAZ (ret);
26087 * foo_igen_object_get_com_acme_coyote:
26088 * @object: A #FooiGenObject.
26090 * Gets the #FooiGenComAcmeCoyote instance for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link> on @object, if any.
26092 * Returns: (transfer full): A #FooiGenComAcmeCoyote that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26094 FooiGenComAcmeCoyote *foo_igen_object_get_com_acme_coyote (FooiGenObject *object)
26096 GDBusInterface *ret;
26097 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Coyote");
26100 return FOO_IGEN_COM_ACME_COYOTE (ret);
26104 * foo_igen_object_get_rocket123:
26105 * @object: A #FooiGenObject.
26107 * Gets the #FooiGenRocket123 instance for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link> on @object, if any.
26109 * Returns: (transfer full): A #FooiGenRocket123 that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26111 FooiGenRocket123 *foo_igen_object_get_rocket123 (FooiGenObject *object)
26113 GDBusInterface *ret;
26114 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Rocket");
26117 return FOO_IGEN_ROCKET123 (ret);
26121 * foo_igen_object_get_bat:
26122 * @object: A #FooiGenObject.
26124 * Gets the #FooiGenBat instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link> on @object, if any.
26126 * Returns: (transfer full): A #FooiGenBat that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26128 FooiGenBat *foo_igen_object_get_bat (FooiGenObject *object)
26130 GDBusInterface *ret;
26131 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bat");
26134 return FOO_IGEN_BAT (ret);
26138 * foo_igen_object_get_authorize:
26139 * @object: A #FooiGenObject.
26141 * Gets the #FooiGenAuthorize instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link> on @object, if any.
26143 * Returns: (transfer full): A #FooiGenAuthorize that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26145 FooiGenAuthorize *foo_igen_object_get_authorize (FooiGenObject *object)
26147 GDBusInterface *ret;
26148 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Authorize");
26151 return FOO_IGEN_AUTHORIZE (ret);
26155 * foo_igen_object_get_method_threads:
26156 * @object: A #FooiGenObject.
26158 * Gets the #FooiGenMethodThreads instance for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link> on @object, if any.
26160 * Returns: (transfer full): A #FooiGenMethodThreads that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26162 FooiGenMethodThreads *foo_igen_object_get_method_threads (FooiGenObject *object)
26164 GDBusInterface *ret;
26165 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.MethodThreads");
26168 return FOO_IGEN_METHOD_THREADS (ret);
26172 * foo_igen_object_get_inline_docs:
26173 * @object: A #FooiGenObject.
26175 * Gets the #FooiGenInlineDocs instance for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link> on @object, if any.
26177 * Returns: (transfer full): A #FooiGenInlineDocs that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26179 FooiGenInlineDocs *foo_igen_object_get_inline_docs (FooiGenObject *object)
26181 GDBusInterface *ret;
26182 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.InlineDocs");
26185 return FOO_IGEN_INLINE_DOCS (ret);
26189 * foo_igen_object_get_changing_interface_v1:
26190 * @object: A #FooiGenObject.
26192 * Gets the #FooiGenChangingInterfaceV1 instance for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link> on @object, if any.
26194 * Returns: (transfer full): A #FooiGenChangingInterfaceV1 that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26196 FooiGenChangingInterfaceV1 *foo_igen_object_get_changing_interface_v1 (FooiGenObject *object)
26198 GDBusInterface *ret;
26199 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV1");
26202 return FOO_IGEN_CHANGING_INTERFACE_V1 (ret);
26206 * foo_igen_object_get_changing_interface_v2:
26207 * @object: A #FooiGenObject.
26209 * Gets the #FooiGenChangingInterfaceV2 instance for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link> on @object, if any.
26211 * Returns: (transfer full): A #FooiGenChangingInterfaceV2 that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26215 FooiGenChangingInterfaceV2 *foo_igen_object_get_changing_interface_v2 (FooiGenObject *object)
26217 GDBusInterface *ret;
26218 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV2");
26221 return FOO_IGEN_CHANGING_INTERFACE_V2 (ret);
26225 * foo_igen_object_get_changing_interface_v10:
26226 * @object: A #FooiGenObject.
26228 * Gets the #FooiGenChangingInterfaceV10 instance for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link> on @object, if any.
26230 * Returns: (transfer full): A #FooiGenChangingInterfaceV10 that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26234 FooiGenChangingInterfaceV10 *foo_igen_object_get_changing_interface_v10 (FooiGenObject *object)
26236 GDBusInterface *ret;
26237 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV10");
26240 return FOO_IGEN_CHANGING_INTERFACE_V10 (ret);
26244 * foo_igen_object_get_test_ugly_case_interface:
26245 * @object: A #FooiGenObject.
26247 * Gets the #FooiGenTesTuglyCASEInterface instance for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link> on @object, if any.
26249 * Returns: (transfer full): A #FooiGenTesTuglyCASEInterface that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26251 FooiGenTesTuglyCASEInterface *foo_igen_object_get_test_ugly_case_interface (FooiGenObject *object)
26253 GDBusInterface *ret;
26254 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "TestUglyCaseInterface");
26257 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (ret);
26261 * foo_igen_object_get_oldie_interface:
26262 * @object: A #FooiGenObject.
26264 * Gets the #FooiGenOldieInterface instance for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link> on @object, if any.
26266 * Returns: (transfer full): A #FooiGenOldieInterface that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26268 * Deprecated: The D-Bus interface has been deprecated.
26270 FooiGenOldieInterface *foo_igen_object_get_oldie_interface (FooiGenObject *object)
26272 GDBusInterface *ret;
26273 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "OldieInterface");
26276 return FOO_IGEN_OLDIE_INTERFACE (ret);
26280 * foo_igen_object_get_unknown_xml_tags:
26281 * @object: A #FooiGenObject.
26283 * Gets the #FooiGenUnknownXmlTags instance for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link> on @object, if any.
26285 * Returns: (transfer full): A #FooiGenUnknownXmlTags that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26287 FooiGenUnknownXmlTags *foo_igen_object_get_unknown_xml_tags (FooiGenObject *object)
26289 GDBusInterface *ret;
26290 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "UnknownXmlTags");
26293 return FOO_IGEN_UNKNOWN_XML_TAGS (ret);
26297 * foo_igen_object_get_fdpassing:
26298 * @object: A #FooiGenObject.
26300 * Gets the #FooiGenFDPassing instance for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link> on @object, if any.
26302 * Returns: (transfer full): A #FooiGenFDPassing that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
26304 FooiGenFDPassing *foo_igen_object_get_fdpassing (FooiGenObject *object)
26306 GDBusInterface *ret;
26307 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "FDPassing");
26310 return FOO_IGEN_FDPASSING (ret);
26315 * foo_igen_object_peek_bar: (skip)
26316 * @object: A #FooiGenObject.
26318 * Like foo_igen_object_get_bar() but doesn't increase the reference count on the returned object.
26320 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26322 * Returns: (transfer none): A #FooiGenBar or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26324 FooiGenBar *foo_igen_object_peek_bar (FooiGenObject *object)
26326 GDBusInterface *ret;
26327 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar");
26330 g_object_unref (ret);
26331 return FOO_IGEN_BAR (ret);
26335 * foo_igen_object_peek_bar_frobnicator: (skip)
26336 * @object: A #FooiGenObject.
26338 * Like foo_igen_object_get_bar_frobnicator() but doesn't increase the reference count on the returned object.
26340 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26342 * Returns: (transfer none): A #FooiGenBarFrobnicator or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26344 FooiGenBarFrobnicator *foo_igen_object_peek_bar_frobnicator (FooiGenObject *object)
26346 GDBusInterface *ret;
26347 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar.Frobnicator");
26350 g_object_unref (ret);
26351 return FOO_IGEN_BAR_FROBNICATOR (ret);
26355 * foo_igen_object_peek_baz: (skip)
26356 * @object: A #FooiGenObject.
26358 * Like foo_igen_object_get_baz() but doesn't increase the reference count on the returned object.
26360 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26362 * Returns: (transfer none): A #FooiGenBaz or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26364 FooiGenBaz *foo_igen_object_peek_baz (FooiGenObject *object)
26366 GDBusInterface *ret;
26367 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Baz");
26370 g_object_unref (ret);
26371 return FOO_IGEN_BAZ (ret);
26375 * foo_igen_object_peek_com_acme_coyote: (skip)
26376 * @object: A #FooiGenObject.
26378 * Like foo_igen_object_get_com_acme_coyote() but doesn't increase the reference count on the returned object.
26380 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26382 * Returns: (transfer none): A #FooiGenComAcmeCoyote or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26384 FooiGenComAcmeCoyote *foo_igen_object_peek_com_acme_coyote (FooiGenObject *object)
26386 GDBusInterface *ret;
26387 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Coyote");
26390 g_object_unref (ret);
26391 return FOO_IGEN_COM_ACME_COYOTE (ret);
26395 * foo_igen_object_peek_rocket123: (skip)
26396 * @object: A #FooiGenObject.
26398 * Like foo_igen_object_get_rocket123() but doesn't increase the reference count on the returned object.
26400 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26402 * Returns: (transfer none): A #FooiGenRocket123 or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26404 FooiGenRocket123 *foo_igen_object_peek_rocket123 (FooiGenObject *object)
26406 GDBusInterface *ret;
26407 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Rocket");
26410 g_object_unref (ret);
26411 return FOO_IGEN_ROCKET123 (ret);
26415 * foo_igen_object_peek_bat: (skip)
26416 * @object: A #FooiGenObject.
26418 * Like foo_igen_object_get_bat() but doesn't increase the reference count on the returned object.
26420 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26422 * Returns: (transfer none): A #FooiGenBat or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26424 FooiGenBat *foo_igen_object_peek_bat (FooiGenObject *object)
26426 GDBusInterface *ret;
26427 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bat");
26430 g_object_unref (ret);
26431 return FOO_IGEN_BAT (ret);
26435 * foo_igen_object_peek_authorize: (skip)
26436 * @object: A #FooiGenObject.
26438 * Like foo_igen_object_get_authorize() but doesn't increase the reference count on the returned object.
26440 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26442 * Returns: (transfer none): A #FooiGenAuthorize or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26444 FooiGenAuthorize *foo_igen_object_peek_authorize (FooiGenObject *object)
26446 GDBusInterface *ret;
26447 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Authorize");
26450 g_object_unref (ret);
26451 return FOO_IGEN_AUTHORIZE (ret);
26455 * foo_igen_object_peek_method_threads: (skip)
26456 * @object: A #FooiGenObject.
26458 * Like foo_igen_object_get_method_threads() but doesn't increase the reference count on the returned object.
26460 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26462 * Returns: (transfer none): A #FooiGenMethodThreads or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26464 FooiGenMethodThreads *foo_igen_object_peek_method_threads (FooiGenObject *object)
26466 GDBusInterface *ret;
26467 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.MethodThreads");
26470 g_object_unref (ret);
26471 return FOO_IGEN_METHOD_THREADS (ret);
26475 * foo_igen_object_peek_inline_docs: (skip)
26476 * @object: A #FooiGenObject.
26478 * Like foo_igen_object_get_inline_docs() but doesn't increase the reference count on the returned object.
26480 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26482 * Returns: (transfer none): A #FooiGenInlineDocs or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26484 FooiGenInlineDocs *foo_igen_object_peek_inline_docs (FooiGenObject *object)
26486 GDBusInterface *ret;
26487 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.InlineDocs");
26490 g_object_unref (ret);
26491 return FOO_IGEN_INLINE_DOCS (ret);
26495 * foo_igen_object_peek_changing_interface_v1: (skip)
26496 * @object: A #FooiGenObject.
26498 * Like foo_igen_object_get_changing_interface_v1() but doesn't increase the reference count on the returned object.
26500 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26502 * Returns: (transfer none): A #FooiGenChangingInterfaceV1 or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26504 FooiGenChangingInterfaceV1 *foo_igen_object_peek_changing_interface_v1 (FooiGenObject *object)
26506 GDBusInterface *ret;
26507 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV1");
26510 g_object_unref (ret);
26511 return FOO_IGEN_CHANGING_INTERFACE_V1 (ret);
26515 * foo_igen_object_peek_changing_interface_v2: (skip)
26516 * @object: A #FooiGenObject.
26518 * Like foo_igen_object_get_changing_interface_v2() but doesn't increase the reference count on the returned object.
26520 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26522 * Returns: (transfer none): A #FooiGenChangingInterfaceV2 or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26526 FooiGenChangingInterfaceV2 *foo_igen_object_peek_changing_interface_v2 (FooiGenObject *object)
26528 GDBusInterface *ret;
26529 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV2");
26532 g_object_unref (ret);
26533 return FOO_IGEN_CHANGING_INTERFACE_V2 (ret);
26537 * foo_igen_object_peek_changing_interface_v10: (skip)
26538 * @object: A #FooiGenObject.
26540 * Like foo_igen_object_get_changing_interface_v10() but doesn't increase the reference count on the returned object.
26542 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26544 * Returns: (transfer none): A #FooiGenChangingInterfaceV10 or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26548 FooiGenChangingInterfaceV10 *foo_igen_object_peek_changing_interface_v10 (FooiGenObject *object)
26550 GDBusInterface *ret;
26551 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV10");
26554 g_object_unref (ret);
26555 return FOO_IGEN_CHANGING_INTERFACE_V10 (ret);
26559 * foo_igen_object_peek_test_ugly_case_interface: (skip)
26560 * @object: A #FooiGenObject.
26562 * Like foo_igen_object_get_test_ugly_case_interface() but doesn't increase the reference count on the returned object.
26564 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26566 * Returns: (transfer none): A #FooiGenTesTuglyCASEInterface or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26568 FooiGenTesTuglyCASEInterface *foo_igen_object_peek_test_ugly_case_interface (FooiGenObject *object)
26570 GDBusInterface *ret;
26571 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "TestUglyCaseInterface");
26574 g_object_unref (ret);
26575 return FOO_IGEN_TEST_UGLY_CASE_INTERFACE (ret);
26579 * foo_igen_object_peek_oldie_interface: (skip)
26580 * @object: A #FooiGenObject.
26582 * Like foo_igen_object_get_oldie_interface() but doesn't increase the reference count on the returned object.
26584 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26586 * Returns: (transfer none): A #FooiGenOldieInterface or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26588 * Deprecated: The D-Bus interface has been deprecated.
26590 FooiGenOldieInterface *foo_igen_object_peek_oldie_interface (FooiGenObject *object)
26592 GDBusInterface *ret;
26593 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "OldieInterface");
26596 g_object_unref (ret);
26597 return FOO_IGEN_OLDIE_INTERFACE (ret);
26601 * foo_igen_object_peek_unknown_xml_tags: (skip)
26602 * @object: A #FooiGenObject.
26604 * Like foo_igen_object_get_unknown_xml_tags() but doesn't increase the reference count on the returned object.
26606 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26608 * Returns: (transfer none): A #FooiGenUnknownXmlTags or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26610 FooiGenUnknownXmlTags *foo_igen_object_peek_unknown_xml_tags (FooiGenObject *object)
26612 GDBusInterface *ret;
26613 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "UnknownXmlTags");
26616 g_object_unref (ret);
26617 return FOO_IGEN_UNKNOWN_XML_TAGS (ret);
26621 * foo_igen_object_peek_fdpassing: (skip)
26622 * @object: A #FooiGenObject.
26624 * Like foo_igen_object_get_fdpassing() but doesn't increase the reference count on the returned object.
26626 * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
26628 * Returns: (transfer none): A #FooiGenFDPassing or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
26630 FooiGenFDPassing *foo_igen_object_peek_fdpassing (FooiGenObject *object)
26632 GDBusInterface *ret;
26633 ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "FDPassing");
26636 g_object_unref (ret);
26637 return FOO_IGEN_FDPASSING (ret);
26642 foo_igen_object_notify (GDBusObject *object, GDBusInterface *interface)
26644 g_object_notify (G_OBJECT (object), ((_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface))->hyphen_name);
26648 * FooiGenObjectProxy:
26650 * The #FooiGenObjectProxy structure contains only private data and should only be accessed using the provided API.
26654 * FooiGenObjectProxyClass:
26655 * @parent_class: The parent class.
26657 * Class structure for #FooiGenObjectProxy.
26661 foo_igen_object_proxy__foo_igen_object_iface_init (FooiGenObjectIface *iface)
26666 foo_igen_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface)
26668 iface->interface_added = foo_igen_object_notify;
26669 iface->interface_removed = foo_igen_object_notify;
26673 G_DEFINE_TYPE_WITH_CODE (FooiGenObjectProxy, foo_igen_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
26674 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_OBJECT, foo_igen_object_proxy__foo_igen_object_iface_init)
26675 G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, foo_igen_object_proxy__g_dbus_object_iface_init));
26678 foo_igen_object_proxy_init (FooiGenObjectProxy *object)
26683 foo_igen_object_proxy_set_property (GObject *gobject,
26685 const GValue *value,
26688 G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
26692 foo_igen_object_proxy_get_property (GObject *gobject,
26697 FooiGenObjectProxy *object = FOO_IGEN_OBJECT_PROXY (gobject);
26698 GDBusInterface *interface;
26703 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar");
26704 g_value_take_object (value, interface);
26708 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar.Frobnicator");
26709 g_value_take_object (value, interface);
26713 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Baz");
26714 g_value_take_object (value, interface);
26718 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Coyote");
26719 g_value_take_object (value, interface);
26723 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Rocket");
26724 g_value_take_object (value, interface);
26728 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bat");
26729 g_value_take_object (value, interface);
26733 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Authorize");
26734 g_value_take_object (value, interface);
26738 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.MethodThreads");
26739 g_value_take_object (value, interface);
26743 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.InlineDocs");
26744 g_value_take_object (value, interface);
26748 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV1");
26749 g_value_take_object (value, interface);
26753 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV2");
26754 g_value_take_object (value, interface);
26758 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV10");
26759 g_value_take_object (value, interface);
26763 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "TestUglyCaseInterface");
26764 g_value_take_object (value, interface);
26768 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "OldieInterface");
26769 g_value_take_object (value, interface);
26773 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "UnknownXmlTags");
26774 g_value_take_object (value, interface);
26778 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "FDPassing");
26779 g_value_take_object (value, interface);
26783 G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
26789 foo_igen_object_proxy_class_init (FooiGenObjectProxyClass *klass)
26791 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
26793 gobject_class->set_property = foo_igen_object_proxy_set_property;
26794 gobject_class->get_property = foo_igen_object_proxy_get_property;
26796 g_object_class_override_property (gobject_class, 1, "bar");
26797 g_object_class_override_property (gobject_class, 2, "bar-frobnicator");
26798 g_object_class_override_property (gobject_class, 3, "baz");
26799 g_object_class_override_property (gobject_class, 4, "com-acme-coyote");
26800 g_object_class_override_property (gobject_class, 5, "rocket123");
26801 g_object_class_override_property (gobject_class, 6, "bat");
26802 g_object_class_override_property (gobject_class, 7, "authorize");
26803 g_object_class_override_property (gobject_class, 8, "method-threads");
26804 g_object_class_override_property (gobject_class, 9, "inline-docs");
26805 g_object_class_override_property (gobject_class, 10, "changing-interface-v1");
26806 g_object_class_override_property (gobject_class, 11, "changing-interface-v2");
26807 g_object_class_override_property (gobject_class, 12, "changing-interface-v10");
26808 g_object_class_override_property (gobject_class, 13, "test-ugly-case-interface");
26809 g_object_class_override_property (gobject_class, 14, "oldie-interface");
26810 g_object_class_override_property (gobject_class, 15, "unknown-xml-tags");
26811 g_object_class_override_property (gobject_class, 16, "fdpassing");
26815 * foo_igen_object_proxy_new:
26816 * @connection: A #GDBusConnection.
26817 * @object_path: An object path.
26819 * Creates a new proxy object.
26821 * Returns: (transfer full): The proxy object.
26823 FooiGenObjectProxy *
26824 foo_igen_object_proxy_new (GDBusConnection *connection,
26825 const gchar *object_path)
26827 g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
26828 g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
26829 return FOO_IGEN_OBJECT_PROXY (g_object_new (FOO_IGEN_TYPE_OBJECT_PROXY, "g-connection", connection, "g-object-path", object_path, NULL));
26833 * FooiGenObjectSkeleton:
26835 * The #FooiGenObjectSkeleton structure contains only private data and should only be accessed using the provided API.
26839 * FooiGenObjectSkeletonClass:
26840 * @parent_class: The parent class.
26842 * Class structure for #FooiGenObjectSkeleton.
26846 foo_igen_object_skeleton__foo_igen_object_iface_init (FooiGenObjectIface *iface)
26852 foo_igen_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface)
26854 iface->interface_added = foo_igen_object_notify;
26855 iface->interface_removed = foo_igen_object_notify;
26858 G_DEFINE_TYPE_WITH_CODE (FooiGenObjectSkeleton, foo_igen_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
26859 G_IMPLEMENT_INTERFACE (FOO_IGEN_TYPE_OBJECT, foo_igen_object_skeleton__foo_igen_object_iface_init)
26860 G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, foo_igen_object_skeleton__g_dbus_object_iface_init));
26863 foo_igen_object_skeleton_init (FooiGenObjectSkeleton *object)
26868 foo_igen_object_skeleton_set_property (GObject *gobject,
26870 const GValue *value,
26873 FooiGenObjectSkeleton *object = FOO_IGEN_OBJECT_SKELETON (gobject);
26874 GDBusInterfaceSkeleton *interface;
26879 interface = g_value_get_object (value);
26880 if (interface != NULL)
26882 g_warn_if_fail (FOO_IGEN_IS_BAR (interface));
26883 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26887 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.Bar");
26892 interface = g_value_get_object (value);
26893 if (interface != NULL)
26895 g_warn_if_fail (FOO_IGEN_IS_BAR_FROBNICATOR (interface));
26896 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26900 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.Bar.Frobnicator");
26905 interface = g_value_get_object (value);
26906 if (interface != NULL)
26908 g_warn_if_fail (FOO_IGEN_IS_BAZ (interface));
26909 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26913 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.Baz");
26918 interface = g_value_get_object (value);
26919 if (interface != NULL)
26921 g_warn_if_fail (FOO_IGEN_IS_COM_ACME_COYOTE (interface));
26922 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26926 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "com.acme.Coyote");
26931 interface = g_value_get_object (value);
26932 if (interface != NULL)
26934 g_warn_if_fail (FOO_IGEN_IS_ROCKET123 (interface));
26935 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26939 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "com.acme.Rocket");
26944 interface = g_value_get_object (value);
26945 if (interface != NULL)
26947 g_warn_if_fail (FOO_IGEN_IS_BAT (interface));
26948 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26952 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.Bat");
26957 interface = g_value_get_object (value);
26958 if (interface != NULL)
26960 g_warn_if_fail (FOO_IGEN_IS_AUTHORIZE (interface));
26961 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26965 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.Authorize");
26970 interface = g_value_get_object (value);
26971 if (interface != NULL)
26973 g_warn_if_fail (FOO_IGEN_IS_METHOD_THREADS (interface));
26974 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26978 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.MethodThreads");
26983 interface = g_value_get_object (value);
26984 if (interface != NULL)
26986 g_warn_if_fail (FOO_IGEN_IS_INLINE_DOCS (interface));
26987 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
26991 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.project.InlineDocs");
26996 interface = g_value_get_object (value);
26997 if (interface != NULL)
26999 g_warn_if_fail (FOO_IGEN_IS_CHANGING_INTERFACE_V1 (interface));
27000 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27004 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "ChangingInterfaceV1");
27009 interface = g_value_get_object (value);
27010 if (interface != NULL)
27012 g_warn_if_fail (FOO_IGEN_IS_CHANGING_INTERFACE_V2 (interface));
27013 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27017 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "ChangingInterfaceV2");
27022 interface = g_value_get_object (value);
27023 if (interface != NULL)
27025 g_warn_if_fail (FOO_IGEN_IS_CHANGING_INTERFACE_V10 (interface));
27026 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27030 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "ChangingInterfaceV10");
27035 interface = g_value_get_object (value);
27036 if (interface != NULL)
27038 g_warn_if_fail (FOO_IGEN_IS_TEST_UGLY_CASE_INTERFACE (interface));
27039 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27043 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "TestUglyCaseInterface");
27048 interface = g_value_get_object (value);
27049 if (interface != NULL)
27051 g_warn_if_fail (FOO_IGEN_IS_OLDIE_INTERFACE (interface));
27052 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27056 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "OldieInterface");
27061 interface = g_value_get_object (value);
27062 if (interface != NULL)
27064 g_warn_if_fail (FOO_IGEN_IS_UNKNOWN_XML_TAGS (interface));
27065 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27069 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "UnknownXmlTags");
27074 interface = g_value_get_object (value);
27075 if (interface != NULL)
27077 g_warn_if_fail (FOO_IGEN_IS_FDPASSING (interface));
27078 g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
27082 g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "FDPassing");
27087 G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
27093 foo_igen_object_skeleton_get_property (GObject *gobject,
27098 FooiGenObjectSkeleton *object = FOO_IGEN_OBJECT_SKELETON (gobject);
27099 GDBusInterface *interface;
27104 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar");
27105 g_value_take_object (value, interface);
27109 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bar.Frobnicator");
27110 g_value_take_object (value, interface);
27114 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Baz");
27115 g_value_take_object (value, interface);
27119 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Coyote");
27120 g_value_take_object (value, interface);
27124 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "com.acme.Rocket");
27125 g_value_take_object (value, interface);
27129 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Bat");
27130 g_value_take_object (value, interface);
27134 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.Authorize");
27135 g_value_take_object (value, interface);
27139 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.MethodThreads");
27140 g_value_take_object (value, interface);
27144 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.project.InlineDocs");
27145 g_value_take_object (value, interface);
27149 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV1");
27150 g_value_take_object (value, interface);
27154 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV2");
27155 g_value_take_object (value, interface);
27159 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "ChangingInterfaceV10");
27160 g_value_take_object (value, interface);
27164 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "TestUglyCaseInterface");
27165 g_value_take_object (value, interface);
27169 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "OldieInterface");
27170 g_value_take_object (value, interface);
27174 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "UnknownXmlTags");
27175 g_value_take_object (value, interface);
27179 interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "FDPassing");
27180 g_value_take_object (value, interface);
27184 G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
27190 foo_igen_object_skeleton_class_init (FooiGenObjectSkeletonClass *klass)
27192 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
27194 gobject_class->set_property = foo_igen_object_skeleton_set_property;
27195 gobject_class->get_property = foo_igen_object_skeleton_get_property;
27197 g_object_class_override_property (gobject_class, 1, "bar");
27198 g_object_class_override_property (gobject_class, 2, "bar-frobnicator");
27199 g_object_class_override_property (gobject_class, 3, "baz");
27200 g_object_class_override_property (gobject_class, 4, "com-acme-coyote");
27201 g_object_class_override_property (gobject_class, 5, "rocket123");
27202 g_object_class_override_property (gobject_class, 6, "bat");
27203 g_object_class_override_property (gobject_class, 7, "authorize");
27204 g_object_class_override_property (gobject_class, 8, "method-threads");
27205 g_object_class_override_property (gobject_class, 9, "inline-docs");
27206 g_object_class_override_property (gobject_class, 10, "changing-interface-v1");
27207 g_object_class_override_property (gobject_class, 11, "changing-interface-v2");
27208 g_object_class_override_property (gobject_class, 12, "changing-interface-v10");
27209 g_object_class_override_property (gobject_class, 13, "test-ugly-case-interface");
27210 g_object_class_override_property (gobject_class, 14, "oldie-interface");
27211 g_object_class_override_property (gobject_class, 15, "unknown-xml-tags");
27212 g_object_class_override_property (gobject_class, 16, "fdpassing");
27216 * foo_igen_object_skeleton_new:
27217 * @object_path: An object path.
27219 * Creates a new skeleton object.
27221 * Returns: (transfer full): The skeleton object.
27223 FooiGenObjectSkeleton *
27224 foo_igen_object_skeleton_new (const gchar *object_path)
27226 g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
27227 return FOO_IGEN_OBJECT_SKELETON (g_object_new (FOO_IGEN_TYPE_OBJECT_SKELETON, "g-object-path", object_path, NULL));
27231 * foo_igen_object_skeleton_set_bar:
27232 * @object: A #FooiGenObjectSkeleton.
27233 * @interface_: (allow-none): A #FooiGenBar or %NULL to clear the interface.
27235 * Sets the #FooiGenBar instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar.top_of_page">org.project.Bar</link> on @object.
27237 void foo_igen_object_skeleton_set_bar (FooiGenObjectSkeleton *object, FooiGenBar *interface_)
27239 g_object_set (G_OBJECT (object), "bar", interface_, NULL);
27243 * foo_igen_object_skeleton_set_bar_frobnicator:
27244 * @object: A #FooiGenObjectSkeleton.
27245 * @interface_: (allow-none): A #FooiGenBarFrobnicator or %NULL to clear the interface.
27247 * Sets the #FooiGenBarFrobnicator instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Bar-Frobnicator.top_of_page">org.project.Bar.Frobnicator</link> on @object.
27249 void foo_igen_object_skeleton_set_bar_frobnicator (FooiGenObjectSkeleton *object, FooiGenBarFrobnicator *interface_)
27251 g_object_set (G_OBJECT (object), "bar-frobnicator", interface_, NULL);
27255 * foo_igen_object_skeleton_set_baz:
27256 * @object: A #FooiGenObjectSkeleton.
27257 * @interface_: (allow-none): A #FooiGenBaz or %NULL to clear the interface.
27259 * Sets the #FooiGenBaz instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Baz.top_of_page">org.project.Baz</link> on @object.
27261 void foo_igen_object_skeleton_set_baz (FooiGenObjectSkeleton *object, FooiGenBaz *interface_)
27263 g_object_set (G_OBJECT (object), "baz", interface_, NULL);
27267 * foo_igen_object_skeleton_set_com_acme_coyote:
27268 * @object: A #FooiGenObjectSkeleton.
27269 * @interface_: (allow-none): A #FooiGenComAcmeCoyote or %NULL to clear the interface.
27271 * Sets the #FooiGenComAcmeCoyote instance for the D-Bus interface <link linkend="gdbus-interface-com-acme-Coyote.top_of_page">com.acme.Coyote</link> on @object.
27273 void foo_igen_object_skeleton_set_com_acme_coyote (FooiGenObjectSkeleton *object, FooiGenComAcmeCoyote *interface_)
27275 g_object_set (G_OBJECT (object), "com-acme-coyote", interface_, NULL);
27279 * foo_igen_object_skeleton_set_rocket123:
27280 * @object: A #FooiGenObjectSkeleton.
27281 * @interface_: (allow-none): A #FooiGenRocket123 or %NULL to clear the interface.
27283 * Sets the #FooiGenRocket123 instance for the D-Bus interface <link linkend="gdbus-interface-com-acme-Rocket.top_of_page">com.acme.Rocket</link> on @object.
27285 void foo_igen_object_skeleton_set_rocket123 (FooiGenObjectSkeleton *object, FooiGenRocket123 *interface_)
27287 g_object_set (G_OBJECT (object), "rocket123", interface_, NULL);
27291 * foo_igen_object_skeleton_set_bat:
27292 * @object: A #FooiGenObjectSkeleton.
27293 * @interface_: (allow-none): A #FooiGenBat or %NULL to clear the interface.
27295 * Sets the #FooiGenBat instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Bat.top_of_page">org.project.Bat</link> on @object.
27297 void foo_igen_object_skeleton_set_bat (FooiGenObjectSkeleton *object, FooiGenBat *interface_)
27299 g_object_set (G_OBJECT (object), "bat", interface_, NULL);
27303 * foo_igen_object_skeleton_set_authorize:
27304 * @object: A #FooiGenObjectSkeleton.
27305 * @interface_: (allow-none): A #FooiGenAuthorize or %NULL to clear the interface.
27307 * Sets the #FooiGenAuthorize instance for the D-Bus interface <link linkend="gdbus-interface-org-project-Authorize.top_of_page">org.project.Authorize</link> on @object.
27309 void foo_igen_object_skeleton_set_authorize (FooiGenObjectSkeleton *object, FooiGenAuthorize *interface_)
27311 g_object_set (G_OBJECT (object), "authorize", interface_, NULL);
27315 * foo_igen_object_skeleton_set_method_threads:
27316 * @object: A #FooiGenObjectSkeleton.
27317 * @interface_: (allow-none): A #FooiGenMethodThreads or %NULL to clear the interface.
27319 * Sets the #FooiGenMethodThreads instance for the D-Bus interface <link linkend="gdbus-interface-org-project-MethodThreads.top_of_page">org.project.MethodThreads</link> on @object.
27321 void foo_igen_object_skeleton_set_method_threads (FooiGenObjectSkeleton *object, FooiGenMethodThreads *interface_)
27323 g_object_set (G_OBJECT (object), "method-threads", interface_, NULL);
27327 * foo_igen_object_skeleton_set_inline_docs:
27328 * @object: A #FooiGenObjectSkeleton.
27329 * @interface_: (allow-none): A #FooiGenInlineDocs or %NULL to clear the interface.
27331 * Sets the #FooiGenInlineDocs instance for the D-Bus interface <link linkend="gdbus-interface-org-project-InlineDocs.top_of_page">org.project.InlineDocs</link> on @object.
27333 void foo_igen_object_skeleton_set_inline_docs (FooiGenObjectSkeleton *object, FooiGenInlineDocs *interface_)
27335 g_object_set (G_OBJECT (object), "inline-docs", interface_, NULL);
27339 * foo_igen_object_skeleton_set_changing_interface_v1:
27340 * @object: A #FooiGenObjectSkeleton.
27341 * @interface_: (allow-none): A #FooiGenChangingInterfaceV1 or %NULL to clear the interface.
27343 * Sets the #FooiGenChangingInterfaceV1 instance for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV1.top_of_page">ChangingInterfaceV1</link> on @object.
27345 void foo_igen_object_skeleton_set_changing_interface_v1 (FooiGenObjectSkeleton *object, FooiGenChangingInterfaceV1 *interface_)
27347 g_object_set (G_OBJECT (object), "changing-interface-v1", interface_, NULL);
27351 * foo_igen_object_skeleton_set_changing_interface_v2:
27352 * @object: A #FooiGenObjectSkeleton.
27353 * @interface_: (allow-none): A #FooiGenChangingInterfaceV2 or %NULL to clear the interface.
27355 * Sets the #FooiGenChangingInterfaceV2 instance for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV2.top_of_page">ChangingInterfaceV2</link> on @object.
27359 void foo_igen_object_skeleton_set_changing_interface_v2 (FooiGenObjectSkeleton *object, FooiGenChangingInterfaceV2 *interface_)
27361 g_object_set (G_OBJECT (object), "changing-interface-v2", interface_, NULL);
27365 * foo_igen_object_skeleton_set_changing_interface_v10:
27366 * @object: A #FooiGenObjectSkeleton.
27367 * @interface_: (allow-none): A #FooiGenChangingInterfaceV10 or %NULL to clear the interface.
27369 * Sets the #FooiGenChangingInterfaceV10 instance for the D-Bus interface <link linkend="gdbus-interface-ChangingInterfaceV10.top_of_page">ChangingInterfaceV10</link> on @object.
27373 void foo_igen_object_skeleton_set_changing_interface_v10 (FooiGenObjectSkeleton *object, FooiGenChangingInterfaceV10 *interface_)
27375 g_object_set (G_OBJECT (object), "changing-interface-v10", interface_, NULL);
27379 * foo_igen_object_skeleton_set_test_ugly_case_interface:
27380 * @object: A #FooiGenObjectSkeleton.
27381 * @interface_: (allow-none): A #FooiGenTesTuglyCASEInterface or %NULL to clear the interface.
27383 * Sets the #FooiGenTesTuglyCASEInterface instance for the D-Bus interface <link linkend="gdbus-interface-TestUglyCaseInterface.top_of_page">TestUglyCaseInterface</link> on @object.
27385 void foo_igen_object_skeleton_set_test_ugly_case_interface (FooiGenObjectSkeleton *object, FooiGenTesTuglyCASEInterface *interface_)
27387 g_object_set (G_OBJECT (object), "test-ugly-case-interface", interface_, NULL);
27391 * foo_igen_object_skeleton_set_oldie_interface:
27392 * @object: A #FooiGenObjectSkeleton.
27393 * @interface_: (allow-none): A #FooiGenOldieInterface or %NULL to clear the interface.
27395 * Sets the #FooiGenOldieInterface instance for the D-Bus interface <link linkend="gdbus-interface-OldieInterface.top_of_page">OldieInterface</link> on @object.
27397 * Deprecated: The D-Bus interface has been deprecated.
27399 void foo_igen_object_skeleton_set_oldie_interface (FooiGenObjectSkeleton *object, FooiGenOldieInterface *interface_)
27401 g_object_set (G_OBJECT (object), "oldie-interface", interface_, NULL);
27405 * foo_igen_object_skeleton_set_unknown_xml_tags:
27406 * @object: A #FooiGenObjectSkeleton.
27407 * @interface_: (allow-none): A #FooiGenUnknownXmlTags or %NULL to clear the interface.
27409 * Sets the #FooiGenUnknownXmlTags instance for the D-Bus interface <link linkend="gdbus-interface-UnknownXmlTags.top_of_page">UnknownXmlTags</link> on @object.
27411 void foo_igen_object_skeleton_set_unknown_xml_tags (FooiGenObjectSkeleton *object, FooiGenUnknownXmlTags *interface_)
27413 g_object_set (G_OBJECT (object), "unknown-xml-tags", interface_, NULL);
27417 * foo_igen_object_skeleton_set_fdpassing:
27418 * @object: A #FooiGenObjectSkeleton.
27419 * @interface_: (allow-none): A #FooiGenFDPassing or %NULL to clear the interface.
27421 * Sets the #FooiGenFDPassing instance for the D-Bus interface <link linkend="gdbus-interface-FDPassing.top_of_page">FDPassing</link> on @object.
27423 void foo_igen_object_skeleton_set_fdpassing (FooiGenObjectSkeleton *object, FooiGenFDPassing *interface_)
27425 g_object_set (G_OBJECT (object), "fdpassing", interface_, NULL);
27429 /* ------------------------------------------------------------------------
27430 * Code for ObjectManager client
27431 * ------------------------------------------------------------------------
27435 * SECTION:FooiGenObjectManagerClient
27436 * @title: FooiGenObjectManagerClient
27437 * @short_description: Generated GDBusObjectManagerClient type
27439 * This section contains a #GDBusObjectManagerClient that uses foo_igen_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.
27443 * FooiGenObjectManagerClient:
27445 * The #FooiGenObjectManagerClient structure contains only private data and should only be accessed using the provided API.
27449 * FooiGenObjectManagerClientClass:
27450 * @parent_class: The parent class.
27452 * Class structure for #FooiGenObjectManagerClient.
27455 G_DEFINE_TYPE (FooiGenObjectManagerClient, foo_igen_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT);
27458 foo_igen_object_manager_client_init (FooiGenObjectManagerClient *manager)
27463 foo_igen_object_manager_client_class_init (FooiGenObjectManagerClientClass *klass)
27468 * foo_igen_object_manager_client_get_proxy_type:
27469 * @manager: A #GDBusObjectManagerClient.
27470 * @object_path: The object path of the remote object (unused).
27471 * @interface_name: (allow-none): Interface name of the remote object or %NULL to get the object proxy #GType.
27472 * @user_data: User data (unused).
27474 * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy<!-- -->- and #GDBusProxy<!-- -->-derived types.
27476 * Returns: A #GDBusProxy<!-- -->-derived #GType if @interface_name is not %NULL, otherwise the #GType for #FooiGenObjectProxy.
27479 foo_igen_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager, const gchar *object_path, const gchar *interface_name, gpointer user_data)
27481 static gsize once_init_value = 0;
27482 static GHashTable *lookup_hash;
27485 if (interface_name == NULL)
27486 return FOO_IGEN_TYPE_OBJECT_PROXY;
27487 if (g_once_init_enter (&once_init_value))
27489 lookup_hash = g_hash_table_new (g_str_hash, g_str_equal);
27490 g_hash_table_insert (lookup_hash, "org.project.Bar", GSIZE_TO_POINTER (FOO_IGEN_TYPE_BAR_PROXY));
27491 g_hash_table_insert (lookup_hash, "org.project.Bar.Frobnicator", GSIZE_TO_POINTER (FOO_IGEN_TYPE_BAR_FROBNICATOR_PROXY));
27492 g_hash_table_insert (lookup_hash, "org.project.Baz", GSIZE_TO_POINTER (FOO_IGEN_TYPE_BAZ_PROXY));
27493 g_hash_table_insert (lookup_hash, "com.acme.Coyote", GSIZE_TO_POINTER (FOO_IGEN_TYPE_COM_ACME_COYOTE_PROXY));
27494 g_hash_table_insert (lookup_hash, "com.acme.Rocket", GSIZE_TO_POINTER (FOO_IGEN_TYPE_ROCKET123_PROXY));
27495 g_hash_table_insert (lookup_hash, "org.project.Bat", GSIZE_TO_POINTER (FOO_IGEN_TYPE_BAT_PROXY));
27496 g_hash_table_insert (lookup_hash, "org.project.Authorize", GSIZE_TO_POINTER (FOO_IGEN_TYPE_AUTHORIZE_PROXY));
27497 g_hash_table_insert (lookup_hash, "org.project.MethodThreads", GSIZE_TO_POINTER (FOO_IGEN_TYPE_METHOD_THREADS_PROXY));
27498 g_hash_table_insert (lookup_hash, "org.project.InlineDocs", GSIZE_TO_POINTER (FOO_IGEN_TYPE_INLINE_DOCS_PROXY));
27499 g_hash_table_insert (lookup_hash, "ChangingInterfaceV1", GSIZE_TO_POINTER (FOO_IGEN_TYPE_CHANGING_INTERFACE_V1_PROXY));
27500 g_hash_table_insert (lookup_hash, "ChangingInterfaceV2", GSIZE_TO_POINTER (FOO_IGEN_TYPE_CHANGING_INTERFACE_V2_PROXY));
27501 g_hash_table_insert (lookup_hash, "ChangingInterfaceV10", GSIZE_TO_POINTER (FOO_IGEN_TYPE_CHANGING_INTERFACE_V10_PROXY));
27502 g_hash_table_insert (lookup_hash, "TestUglyCaseInterface", GSIZE_TO_POINTER (FOO_IGEN_TYPE_TEST_UGLY_CASE_INTERFACE_PROXY));
27503 g_hash_table_insert (lookup_hash, "OldieInterface", GSIZE_TO_POINTER (FOO_IGEN_TYPE_OLDIE_INTERFACE_PROXY));
27504 g_hash_table_insert (lookup_hash, "UnknownXmlTags", GSIZE_TO_POINTER (FOO_IGEN_TYPE_UNKNOWN_XML_TAGS_PROXY));
27505 g_hash_table_insert (lookup_hash, "FDPassing", GSIZE_TO_POINTER (FOO_IGEN_TYPE_FDPASSING_PROXY));
27506 g_once_init_leave (&once_init_value, 1);
27508 ret = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (lookup_hash, interface_name));
27509 if (ret == (GType) 0)
27510 ret = G_TYPE_DBUS_PROXY;
27515 * foo_igen_object_manager_client_new:
27516 * @connection: A #GDBusConnection.
27517 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
27518 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
27519 * @object_path: An object path.
27520 * @cancellable: (allow-none): A #GCancellable or %NULL.
27521 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
27522 * @user_data: User data to pass to @callback.
27524 * Asynchronously creates #GDBusObjectManagerClient using foo_igen_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details.
27526 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
27527 * You can then call foo_igen_object_manager_client_new_finish() to get the result of the operation.
27529 * See foo_igen_object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
27532 foo_igen_object_manager_client_new (
27533 GDBusConnection *connection,
27534 GDBusObjectManagerClientFlags flags,
27536 const gchar *object_path,
27537 GCancellable *cancellable,
27538 GAsyncReadyCallback callback,
27539 gpointer user_data)
27541 g_async_initable_new_async (FOO_IGEN_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", foo_igen_object_manager_client_get_proxy_type, NULL);
27545 * foo_igen_object_manager_client_new_finish:
27546 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_object_manager_client_new().
27547 * @error: Return location for error or %NULL
27549 * Finishes an operation started with foo_igen_object_manager_client_new().
27551 * Returns: (transfer full) (type FooiGenObjectManagerClient): The constructed object manager client or %NULL if @error is set.
27553 GDBusObjectManager *
27554 foo_igen_object_manager_client_new_finish (
27559 GObject *source_object;
27560 source_object = g_async_result_get_source_object (res);
27561 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
27562 g_object_unref (source_object);
27564 return G_DBUS_OBJECT_MANAGER (ret);
27570 * foo_igen_object_manager_client_new_sync:
27571 * @connection: A #GDBusConnection.
27572 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
27573 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
27574 * @object_path: An object path.
27575 * @cancellable: (allow-none): A #GCancellable or %NULL.
27576 * @error: Return location for error or %NULL
27578 * Synchronously creates #GDBusObjectManagerClient using foo_igen_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
27580 * The calling thread is blocked until a reply is received.
27582 * See foo_igen_object_manager_client_new() for the asynchronous version of this constructor.
27584 * Returns: (transfer full) (type FooiGenObjectManagerClient): The constructed object manager client or %NULL if @error is set.
27586 GDBusObjectManager *
27587 foo_igen_object_manager_client_new_sync (
27588 GDBusConnection *connection,
27589 GDBusObjectManagerClientFlags flags,
27591 const gchar *object_path,
27592 GCancellable *cancellable,
27596 ret = g_initable_new (FOO_IGEN_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", foo_igen_object_manager_client_get_proxy_type, NULL);
27598 return G_DBUS_OBJECT_MANAGER (ret);
27605 * foo_igen_object_manager_client_new_for_bus:
27606 * @bus_type: A #GBusType.
27607 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
27608 * @name: A bus name (well-known or unique).
27609 * @object_path: An object path.
27610 * @cancellable: (allow-none): A #GCancellable or %NULL.
27611 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
27612 * @user_data: User data to pass to @callback.
27614 * Like foo_igen_object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection.
27616 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
27617 * You can then call foo_igen_object_manager_client_new_for_bus_finish() to get the result of the operation.
27619 * See foo_igen_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor.
27622 foo_igen_object_manager_client_new_for_bus (
27624 GDBusObjectManagerClientFlags flags,
27626 const gchar *object_path,
27627 GCancellable *cancellable,
27628 GAsyncReadyCallback callback,
27629 gpointer user_data)
27631 g_async_initable_new_async (FOO_IGEN_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", foo_igen_object_manager_client_get_proxy_type, NULL);
27635 * foo_igen_object_manager_client_new_for_bus_finish:
27636 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to foo_igen_object_manager_client_new_for_bus().
27637 * @error: Return location for error or %NULL
27639 * Finishes an operation started with foo_igen_object_manager_client_new_for_bus().
27641 * Returns: (transfer full) (type FooiGenObjectManagerClient): The constructed object manager client or %NULL if @error is set.
27643 GDBusObjectManager *
27644 foo_igen_object_manager_client_new_for_bus_finish (
27649 GObject *source_object;
27650 source_object = g_async_result_get_source_object (res);
27651 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
27652 g_object_unref (source_object);
27654 return G_DBUS_OBJECT_MANAGER (ret);
27660 * foo_igen_object_manager_client_new_for_bus_sync:
27661 * @bus_type: A #GBusType.
27662 * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
27663 * @name: A bus name (well-known or unique).
27664 * @object_path: An object path.
27665 * @cancellable: (allow-none): A #GCancellable or %NULL.
27666 * @error: Return location for error or %NULL
27668 * Like foo_igen_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
27670 * The calling thread is blocked until a reply is received.
27672 * See foo_igen_object_manager_client_new_for_bus() for the asynchronous version of this constructor.
27674 * Returns: (transfer full) (type FooiGenObjectManagerClient): The constructed object manager client or %NULL if @error is set.
27676 GDBusObjectManager *
27677 foo_igen_object_manager_client_new_for_bus_sync (
27679 GDBusObjectManagerClientFlags flags,
27681 const gchar *object_path,
27682 GCancellable *cancellable,
27686 ret = g_initable_new (FOO_IGEN_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", foo_igen_object_manager_client_get_proxy_type, NULL);
27688 return G_DBUS_OBJECT_MANAGER (ret);