2 * Generated by gdbus-codegen 2.40.0. DO NOT EDIT.
4 * The license of this code is the same as for the source it was derived from.
11 #include "hostnamed-gen.h"
15 # include <gio/gunixfdlist.h>
20 GDBusArgInfo parent_struct
;
21 gboolean use_gvariant
;
22 } _ExtendedGDBusArgInfo
;
26 GDBusMethodInfo parent_struct
;
27 const gchar
*signal_name
;
29 } _ExtendedGDBusMethodInfo
;
33 GDBusSignalInfo parent_struct
;
34 const gchar
*signal_name
;
35 } _ExtendedGDBusSignalInfo
;
39 GDBusPropertyInfo parent_struct
;
40 const gchar
*hyphen_name
;
41 gboolean use_gvariant
;
42 } _ExtendedGDBusPropertyInfo
;
46 GDBusInterfaceInfo parent_struct
;
47 const gchar
*hyphen_name
;
48 } _ExtendedGDBusInterfaceInfo
;
52 const _ExtendedGDBusPropertyInfo
*info
;
54 GValue orig_value
; /* the value before the change */
58 _changed_property_free (ChangedProperty
*data
)
60 g_value_unset (&data
->orig_value
);
65 _g_strv_equal0 (gchar
**a
, gchar
**b
)
69 if (a
== NULL
&& b
== NULL
)
74 if (a
== NULL
|| b
== NULL
)
76 if (g_strv_length (a
) != g_strv_length (b
))
78 for (n
= 0; a
[n
] != NULL
; n
++)
79 if (g_strcmp0 (a
[n
], b
[n
]) != 0)
87 _g_variant_equal0 (GVariant
*a
, GVariant
*b
)
90 if (a
== NULL
&& b
== NULL
)
95 if (a
== NULL
|| b
== NULL
)
97 ret
= g_variant_equal (a
, b
);
102 G_GNUC_UNUSED
static gboolean
103 _g_value_equal (const GValue
*a
, const GValue
*b
)
105 gboolean ret
= FALSE
;
106 g_assert (G_VALUE_TYPE (a
) == G_VALUE_TYPE (b
));
107 switch (G_VALUE_TYPE (a
))
110 ret
= (g_value_get_boolean (a
) == g_value_get_boolean (b
));
113 ret
= (g_value_get_uchar (a
) == g_value_get_uchar (b
));
116 ret
= (g_value_get_int (a
) == g_value_get_int (b
));
119 ret
= (g_value_get_uint (a
) == g_value_get_uint (b
));
122 ret
= (g_value_get_int64 (a
) == g_value_get_int64 (b
));
125 ret
= (g_value_get_uint64 (a
) == g_value_get_uint64 (b
));
129 /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
130 gdouble da
= g_value_get_double (a
);
131 gdouble db
= g_value_get_double (b
);
132 ret
= memcmp (&da
, &db
, sizeof (gdouble
)) == 0;
136 ret
= (g_strcmp0 (g_value_get_string (a
), g_value_get_string (b
)) == 0);
139 ret
= _g_variant_equal0 (g_value_get_variant (a
), g_value_get_variant (b
));
142 if (G_VALUE_TYPE (a
) == G_TYPE_STRV
)
143 ret
= _g_strv_equal0 (g_value_get_boxed (a
), g_value_get_boxed (b
));
145 g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a
)));
151 /* ------------------------------------------------------------------------
152 * Code for interface org.freedesktop.hostname1
153 * ------------------------------------------------------------------------
157 * SECTION:hostnamedHostname1
158 * @title: hostnamedHostname1
159 * @short_description: Generated C code for the org.freedesktop.hostname1 D-Bus interface
161 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link> D-Bus interface in C.
164 /* ---- Introspection data for org.freedesktop.hostname1 ---- */
166 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_hostname_IN_ARG_unnamed_arg0
=
170 (gchar
*) "unnamed_arg0",
177 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_hostname_IN_ARG_unnamed_arg1
=
181 (gchar
*) "unnamed_arg1",
188 static const _ExtendedGDBusArgInfo
* const _hostnamed_hostname1_method_info_set_hostname_IN_ARG_pointers
[] =
190 &_hostnamed_hostname1_method_info_set_hostname_IN_ARG_unnamed_arg0
,
191 &_hostnamed_hostname1_method_info_set_hostname_IN_ARG_unnamed_arg1
,
195 static const _ExtendedGDBusMethodInfo _hostnamed_hostname1_method_info_set_hostname
=
199 (gchar
*) "SetHostname",
200 (GDBusArgInfo
**) &_hostnamed_hostname1_method_info_set_hostname_IN_ARG_pointers
,
204 "handle-set-hostname",
208 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg0
=
212 (gchar
*) "unnamed_arg0",
219 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg1
=
223 (gchar
*) "unnamed_arg1",
230 static const _ExtendedGDBusArgInfo
* const _hostnamed_hostname1_method_info_set_static_hostname_IN_ARG_pointers
[] =
232 &_hostnamed_hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg0
,
233 &_hostnamed_hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg1
,
237 static const _ExtendedGDBusMethodInfo _hostnamed_hostname1_method_info_set_static_hostname
=
241 (gchar
*) "SetStaticHostname",
242 (GDBusArgInfo
**) &_hostnamed_hostname1_method_info_set_static_hostname_IN_ARG_pointers
,
246 "handle-set-static-hostname",
250 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg0
=
254 (gchar
*) "unnamed_arg0",
261 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg1
=
265 (gchar
*) "unnamed_arg1",
272 static const _ExtendedGDBusArgInfo
* const _hostnamed_hostname1_method_info_set_pretty_hostname_IN_ARG_pointers
[] =
274 &_hostnamed_hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg0
,
275 &_hostnamed_hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg1
,
279 static const _ExtendedGDBusMethodInfo _hostnamed_hostname1_method_info_set_pretty_hostname
=
283 (gchar
*) "SetPrettyHostname",
284 (GDBusArgInfo
**) &_hostnamed_hostname1_method_info_set_pretty_hostname_IN_ARG_pointers
,
288 "handle-set-pretty-hostname",
292 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg0
=
296 (gchar
*) "unnamed_arg0",
303 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg1
=
307 (gchar
*) "unnamed_arg1",
314 static const _ExtendedGDBusArgInfo
* const _hostnamed_hostname1_method_info_set_icon_name_IN_ARG_pointers
[] =
316 &_hostnamed_hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg0
,
317 &_hostnamed_hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg1
,
321 static const _ExtendedGDBusMethodInfo _hostnamed_hostname1_method_info_set_icon_name
=
325 (gchar
*) "SetIconName",
326 (GDBusArgInfo
**) &_hostnamed_hostname1_method_info_set_icon_name_IN_ARG_pointers
,
330 "handle-set-icon-name",
334 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_chassis_IN_ARG_unnamed_arg0
=
338 (gchar
*) "unnamed_arg0",
345 static const _ExtendedGDBusArgInfo _hostnamed_hostname1_method_info_set_chassis_IN_ARG_unnamed_arg1
=
349 (gchar
*) "unnamed_arg1",
356 static const _ExtendedGDBusArgInfo
* const _hostnamed_hostname1_method_info_set_chassis_IN_ARG_pointers
[] =
358 &_hostnamed_hostname1_method_info_set_chassis_IN_ARG_unnamed_arg0
,
359 &_hostnamed_hostname1_method_info_set_chassis_IN_ARG_unnamed_arg1
,
363 static const _ExtendedGDBusMethodInfo _hostnamed_hostname1_method_info_set_chassis
=
367 (gchar
*) "SetChassis",
368 (GDBusArgInfo
**) &_hostnamed_hostname1_method_info_set_chassis_IN_ARG_pointers
,
372 "handle-set-chassis",
376 static const _ExtendedGDBusMethodInfo
* const _hostnamed_hostname1_method_info_pointers
[] =
378 &_hostnamed_hostname1_method_info_set_hostname
,
379 &_hostnamed_hostname1_method_info_set_static_hostname
,
380 &_hostnamed_hostname1_method_info_set_pretty_hostname
,
381 &_hostnamed_hostname1_method_info_set_icon_name
,
382 &_hostnamed_hostname1_method_info_set_chassis
,
386 static const GDBusAnnotationInfo _hostnamed_hostname1_property_hostname_annotation_info_0
=
389 (gchar
*) "org.freedesktop.DBus.Property.EmitsChangedSignal",
394 static const GDBusAnnotationInfo
* const _hostnamed_hostname1_property_hostname_annotation_info_pointers
[] =
396 &_hostnamed_hostname1_property_hostname_annotation_info_0
,
400 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_hostname
=
404 (gchar
*) "Hostname",
406 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
407 (GDBusAnnotationInfo
**) &_hostnamed_hostname1_property_hostname_annotation_info_pointers
413 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_static_hostname
=
417 (gchar
*) "StaticHostname",
419 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
426 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_pretty_hostname
=
430 (gchar
*) "PrettyHostname",
432 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
439 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_icon_name
=
443 (gchar
*) "IconName",
445 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
452 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_chassis
=
458 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
465 static const GDBusAnnotationInfo _hostnamed_hostname1_property_kernel_name_annotation_info_0
=
468 (gchar
*) "org.freedesktop.DBus.Property.EmitsChangedSignal",
473 static const GDBusAnnotationInfo
* const _hostnamed_hostname1_property_kernel_name_annotation_info_pointers
[] =
475 &_hostnamed_hostname1_property_kernel_name_annotation_info_0
,
479 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_kernel_name
=
483 (gchar
*) "KernelName",
485 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
486 (GDBusAnnotationInfo
**) &_hostnamed_hostname1_property_kernel_name_annotation_info_pointers
492 static const GDBusAnnotationInfo _hostnamed_hostname1_property_kernel_release_annotation_info_0
=
495 (gchar
*) "org.freedesktop.DBus.Property.EmitsChangedSignal",
500 static const GDBusAnnotationInfo
* const _hostnamed_hostname1_property_kernel_release_annotation_info_pointers
[] =
502 &_hostnamed_hostname1_property_kernel_release_annotation_info_0
,
506 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_kernel_release
=
510 (gchar
*) "KernelRelease",
512 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
513 (GDBusAnnotationInfo
**) &_hostnamed_hostname1_property_kernel_release_annotation_info_pointers
519 static const GDBusAnnotationInfo _hostnamed_hostname1_property_kernel_version_annotation_info_0
=
522 (gchar
*) "org.freedesktop.DBus.Property.EmitsChangedSignal",
527 static const GDBusAnnotationInfo
* const _hostnamed_hostname1_property_kernel_version_annotation_info_pointers
[] =
529 &_hostnamed_hostname1_property_kernel_version_annotation_info_0
,
533 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_kernel_version
=
537 (gchar
*) "KernelVersion",
539 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
540 (GDBusAnnotationInfo
**) &_hostnamed_hostname1_property_kernel_version_annotation_info_pointers
546 static const GDBusAnnotationInfo _hostnamed_hostname1_property_operating_system_pretty_name_annotation_info_0
=
549 (gchar
*) "org.freedesktop.DBus.Property.EmitsChangedSignal",
554 static const GDBusAnnotationInfo
* const _hostnamed_hostname1_property_operating_system_pretty_name_annotation_info_pointers
[] =
556 &_hostnamed_hostname1_property_operating_system_pretty_name_annotation_info_0
,
560 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_operating_system_pretty_name
=
564 (gchar
*) "OperatingSystemPrettyName",
566 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
567 (GDBusAnnotationInfo
**) &_hostnamed_hostname1_property_operating_system_pretty_name_annotation_info_pointers
569 "operating-system-pretty-name",
573 static const GDBusAnnotationInfo _hostnamed_hostname1_property_operating_system_cpename_annotation_info_0
=
576 (gchar
*) "org.freedesktop.DBus.Property.EmitsChangedSignal",
581 static const GDBusAnnotationInfo
* const _hostnamed_hostname1_property_operating_system_cpename_annotation_info_pointers
[] =
583 &_hostnamed_hostname1_property_operating_system_cpename_annotation_info_0
,
587 static const _ExtendedGDBusPropertyInfo _hostnamed_hostname1_property_info_operating_system_cpename
=
591 (gchar
*) "OperatingSystemCPEName",
593 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
594 (GDBusAnnotationInfo
**) &_hostnamed_hostname1_property_operating_system_cpename_annotation_info_pointers
596 "operating-system-cpename",
600 static const _ExtendedGDBusPropertyInfo
* const _hostnamed_hostname1_property_info_pointers
[] =
602 &_hostnamed_hostname1_property_info_hostname
,
603 &_hostnamed_hostname1_property_info_static_hostname
,
604 &_hostnamed_hostname1_property_info_pretty_hostname
,
605 &_hostnamed_hostname1_property_info_icon_name
,
606 &_hostnamed_hostname1_property_info_chassis
,
607 &_hostnamed_hostname1_property_info_kernel_name
,
608 &_hostnamed_hostname1_property_info_kernel_release
,
609 &_hostnamed_hostname1_property_info_kernel_version
,
610 &_hostnamed_hostname1_property_info_operating_system_pretty_name
,
611 &_hostnamed_hostname1_property_info_operating_system_cpename
,
615 static const _ExtendedGDBusInterfaceInfo _hostnamed_hostname1_interface_info
=
619 (gchar
*) "org.freedesktop.hostname1",
620 (GDBusMethodInfo
**) &_hostnamed_hostname1_method_info_pointers
,
622 (GDBusPropertyInfo
**) &_hostnamed_hostname1_property_info_pointers
,
630 * hostnamed_hostname1_interface_info:
632 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link> D-Bus interface.
634 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
637 hostnamed_hostname1_interface_info (void)
639 return (GDBusInterfaceInfo
*) &_hostnamed_hostname1_interface_info
.parent_struct
;
643 * hostnamed_hostname1_override_properties:
644 * @klass: The class structure for a #GObject<!-- -->-derived class.
645 * @property_id_begin: The property id to assign to the first overridden property.
647 * Overrides all #GObject properties in the #hostnamedHostname1 interface for a concrete class.
648 * The properties are overridden in the order they are defined.
650 * Returns: The last property id.
653 hostnamed_hostname1_override_properties (GObjectClass
*klass
, guint property_id_begin
)
655 g_object_class_override_property (klass
, property_id_begin
++, "hostname");
656 g_object_class_override_property (klass
, property_id_begin
++, "static-hostname");
657 g_object_class_override_property (klass
, property_id_begin
++, "pretty-hostname");
658 g_object_class_override_property (klass
, property_id_begin
++, "icon-name");
659 g_object_class_override_property (klass
, property_id_begin
++, "chassis");
660 g_object_class_override_property (klass
, property_id_begin
++, "kernel-name");
661 g_object_class_override_property (klass
, property_id_begin
++, "kernel-release");
662 g_object_class_override_property (klass
, property_id_begin
++, "kernel-version");
663 g_object_class_override_property (klass
, property_id_begin
++, "operating-system-pretty-name");
664 g_object_class_override_property (klass
, property_id_begin
++, "operating-system-cpename");
665 return property_id_begin
- 1;
671 * hostnamedHostname1:
673 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link>.
677 * hostnamedHostname1Iface:
678 * @parent_iface: The parent interface.
679 * @handle_set_chassis: Handler for the #hostnamedHostname1::handle-set-chassis signal.
680 * @handle_set_hostname: Handler for the #hostnamedHostname1::handle-set-hostname signal.
681 * @handle_set_icon_name: Handler for the #hostnamedHostname1::handle-set-icon-name signal.
682 * @handle_set_pretty_hostname: Handler for the #hostnamedHostname1::handle-set-pretty-hostname signal.
683 * @handle_set_static_hostname: Handler for the #hostnamedHostname1::handle-set-static-hostname signal.
684 * @get_chassis: Getter for the #hostnamedHostname1:chassis property.
685 * @get_hostname: Getter for the #hostnamedHostname1:hostname property.
686 * @get_icon_name: Getter for the #hostnamedHostname1:icon-name property.
687 * @get_kernel_name: Getter for the #hostnamedHostname1:kernel-name property.
688 * @get_kernel_release: Getter for the #hostnamedHostname1:kernel-release property.
689 * @get_kernel_version: Getter for the #hostnamedHostname1:kernel-version property.
690 * @get_operating_system_cpename: Getter for the #hostnamedHostname1:operating-system-cpename property.
691 * @get_operating_system_pretty_name: Getter for the #hostnamedHostname1:operating-system-pretty-name property.
692 * @get_pretty_hostname: Getter for the #hostnamedHostname1:pretty-hostname property.
693 * @get_static_hostname: Getter for the #hostnamedHostname1:static-hostname property.
695 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link>.
698 typedef hostnamedHostname1Iface hostnamedHostname1Interface
;
699 G_DEFINE_INTERFACE (hostnamedHostname1
, hostnamed_hostname1
, G_TYPE_OBJECT
);
702 hostnamed_hostname1_default_init (hostnamedHostname1Iface
*iface
)
704 /* GObject signals for incoming D-Bus method calls: */
706 * hostnamedHostname1::handle-set-hostname:
707 * @object: A #hostnamedHostname1.
708 * @invocation: A #GDBusMethodInvocation.
709 * @arg_unnamed_arg0: Argument passed by remote caller.
710 * @arg_unnamed_arg1: Argument passed by remote caller.
712 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-hostname1.SetHostname">SetHostname()</link> D-Bus method.
714 * 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 hostnamed_hostname1_complete_set_hostname() 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.
716 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
718 g_signal_new ("handle-set-hostname",
719 G_TYPE_FROM_INTERFACE (iface
),
721 G_STRUCT_OFFSET (hostnamedHostname1Iface
, handle_set_hostname
),
722 g_signal_accumulator_true_handled
,
724 g_cclosure_marshal_generic
,
727 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_BOOLEAN
);
730 * hostnamedHostname1::handle-set-static-hostname:
731 * @object: A #hostnamedHostname1.
732 * @invocation: A #GDBusMethodInvocation.
733 * @arg_unnamed_arg0: Argument passed by remote caller.
734 * @arg_unnamed_arg1: Argument passed by remote caller.
736 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-hostname1.SetStaticHostname">SetStaticHostname()</link> D-Bus method.
738 * 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 hostnamed_hostname1_complete_set_static_hostname() 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.
740 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
742 g_signal_new ("handle-set-static-hostname",
743 G_TYPE_FROM_INTERFACE (iface
),
745 G_STRUCT_OFFSET (hostnamedHostname1Iface
, handle_set_static_hostname
),
746 g_signal_accumulator_true_handled
,
748 g_cclosure_marshal_generic
,
751 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_BOOLEAN
);
754 * hostnamedHostname1::handle-set-pretty-hostname:
755 * @object: A #hostnamedHostname1.
756 * @invocation: A #GDBusMethodInvocation.
757 * @arg_unnamed_arg0: Argument passed by remote caller.
758 * @arg_unnamed_arg1: Argument passed by remote caller.
760 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-hostname1.SetPrettyHostname">SetPrettyHostname()</link> D-Bus method.
762 * 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 hostnamed_hostname1_complete_set_pretty_hostname() 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.
764 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
766 g_signal_new ("handle-set-pretty-hostname",
767 G_TYPE_FROM_INTERFACE (iface
),
769 G_STRUCT_OFFSET (hostnamedHostname1Iface
, handle_set_pretty_hostname
),
770 g_signal_accumulator_true_handled
,
772 g_cclosure_marshal_generic
,
775 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_BOOLEAN
);
778 * hostnamedHostname1::handle-set-icon-name:
779 * @object: A #hostnamedHostname1.
780 * @invocation: A #GDBusMethodInvocation.
781 * @arg_unnamed_arg0: Argument passed by remote caller.
782 * @arg_unnamed_arg1: Argument passed by remote caller.
784 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-hostname1.SetIconName">SetIconName()</link> D-Bus method.
786 * 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 hostnamed_hostname1_complete_set_icon_name() 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.
788 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
790 g_signal_new ("handle-set-icon-name",
791 G_TYPE_FROM_INTERFACE (iface
),
793 G_STRUCT_OFFSET (hostnamedHostname1Iface
, handle_set_icon_name
),
794 g_signal_accumulator_true_handled
,
796 g_cclosure_marshal_generic
,
799 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_BOOLEAN
);
802 * hostnamedHostname1::handle-set-chassis:
803 * @object: A #hostnamedHostname1.
804 * @invocation: A #GDBusMethodInvocation.
805 * @arg_unnamed_arg0: Argument passed by remote caller.
806 * @arg_unnamed_arg1: Argument passed by remote caller.
808 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-hostname1.SetChassis">SetChassis()</link> D-Bus method.
810 * 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 hostnamed_hostname1_complete_set_chassis() 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.
812 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
814 g_signal_new ("handle-set-chassis",
815 G_TYPE_FROM_INTERFACE (iface
),
817 G_STRUCT_OFFSET (hostnamedHostname1Iface
, handle_set_chassis
),
818 g_signal_accumulator_true_handled
,
820 g_cclosure_marshal_generic
,
823 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_BOOLEAN
);
825 /* GObject properties for D-Bus properties: */
827 * hostnamedHostname1:hostname:
829 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.Hostname">"Hostname"</link>.
831 * 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.
833 g_object_interface_install_property (iface
,
834 g_param_spec_string ("hostname", "Hostname", "Hostname", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
836 * hostnamedHostname1:static-hostname:
838 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.StaticHostname">"StaticHostname"</link>.
840 * 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.
842 g_object_interface_install_property (iface
,
843 g_param_spec_string ("static-hostname", "StaticHostname", "StaticHostname", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
845 * hostnamedHostname1:pretty-hostname:
847 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.PrettyHostname">"PrettyHostname"</link>.
849 * 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.
851 g_object_interface_install_property (iface
,
852 g_param_spec_string ("pretty-hostname", "PrettyHostname", "PrettyHostname", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
854 * hostnamedHostname1:icon-name:
856 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.IconName">"IconName"</link>.
858 * 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.
860 g_object_interface_install_property (iface
,
861 g_param_spec_string ("icon-name", "IconName", "IconName", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
863 * hostnamedHostname1:chassis:
865 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.Chassis">"Chassis"</link>.
867 * 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.
869 g_object_interface_install_property (iface
,
870 g_param_spec_string ("chassis", "Chassis", "Chassis", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
872 * hostnamedHostname1:kernel-name:
874 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.KernelName">"KernelName"</link>.
876 * 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.
878 g_object_interface_install_property (iface
,
879 g_param_spec_string ("kernel-name", "KernelName", "KernelName", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
881 * hostnamedHostname1:kernel-release:
883 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.KernelRelease">"KernelRelease"</link>.
885 * 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.
887 g_object_interface_install_property (iface
,
888 g_param_spec_string ("kernel-release", "KernelRelease", "KernelRelease", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
890 * hostnamedHostname1:kernel-version:
892 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.KernelVersion">"KernelVersion"</link>.
894 * 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.
896 g_object_interface_install_property (iface
,
897 g_param_spec_string ("kernel-version", "KernelVersion", "KernelVersion", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
899 * hostnamedHostname1:operating-system-pretty-name:
901 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemPrettyName">"OperatingSystemPrettyName"</link>.
903 * 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.
905 g_object_interface_install_property (iface
,
906 g_param_spec_string ("operating-system-pretty-name", "OperatingSystemPrettyName", "OperatingSystemPrettyName", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
908 * hostnamedHostname1:operating-system-cpename:
910 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemCPEName">"OperatingSystemCPEName"</link>.
912 * 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.
914 g_object_interface_install_property (iface
,
915 g_param_spec_string ("operating-system-cpename", "OperatingSystemCPEName", "OperatingSystemCPEName", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
919 * hostnamed_hostname1_get_hostname: (skip)
920 * @object: A #hostnamedHostname1.
922 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.Hostname">"Hostname"</link> D-Bus property.
924 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
926 * <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 hostnamed_hostname1_dup_hostname() if on another thread.</warning>
928 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
931 hostnamed_hostname1_get_hostname (hostnamedHostname1
*object
)
933 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_hostname (object
);
937 * hostnamed_hostname1_dup_hostname: (skip)
938 * @object: A #hostnamedHostname1.
940 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.Hostname">"Hostname"</link> D-Bus property.
942 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
944 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
947 hostnamed_hostname1_dup_hostname (hostnamedHostname1
*object
)
950 g_object_get (G_OBJECT (object
), "hostname", &value
, NULL
);
955 * hostnamed_hostname1_set_hostname: (skip)
956 * @object: A #hostnamedHostname1.
957 * @value: The value to set.
959 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.Hostname">"Hostname"</link> D-Bus property to @value.
961 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
964 hostnamed_hostname1_set_hostname (hostnamedHostname1
*object
, const gchar
*value
)
966 g_object_set (G_OBJECT (object
), "hostname", value
, NULL
);
970 * hostnamed_hostname1_get_static_hostname: (skip)
971 * @object: A #hostnamedHostname1.
973 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.StaticHostname">"StaticHostname"</link> D-Bus property.
975 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
977 * <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 hostnamed_hostname1_dup_static_hostname() if on another thread.</warning>
979 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
982 hostnamed_hostname1_get_static_hostname (hostnamedHostname1
*object
)
984 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_static_hostname (object
);
988 * hostnamed_hostname1_dup_static_hostname: (skip)
989 * @object: A #hostnamedHostname1.
991 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.StaticHostname">"StaticHostname"</link> D-Bus property.
993 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
995 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
998 hostnamed_hostname1_dup_static_hostname (hostnamedHostname1
*object
)
1001 g_object_get (G_OBJECT (object
), "static-hostname", &value
, NULL
);
1006 * hostnamed_hostname1_set_static_hostname: (skip)
1007 * @object: A #hostnamedHostname1.
1008 * @value: The value to set.
1010 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.StaticHostname">"StaticHostname"</link> D-Bus property to @value.
1012 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1015 hostnamed_hostname1_set_static_hostname (hostnamedHostname1
*object
, const gchar
*value
)
1017 g_object_set (G_OBJECT (object
), "static-hostname", value
, NULL
);
1021 * hostnamed_hostname1_get_pretty_hostname: (skip)
1022 * @object: A #hostnamedHostname1.
1024 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.PrettyHostname">"PrettyHostname"</link> D-Bus property.
1026 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1028 * <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 hostnamed_hostname1_dup_pretty_hostname() if on another thread.</warning>
1030 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1033 hostnamed_hostname1_get_pretty_hostname (hostnamedHostname1
*object
)
1035 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_pretty_hostname (object
);
1039 * hostnamed_hostname1_dup_pretty_hostname: (skip)
1040 * @object: A #hostnamedHostname1.
1042 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.PrettyHostname">"PrettyHostname"</link> D-Bus property.
1044 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1046 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1049 hostnamed_hostname1_dup_pretty_hostname (hostnamedHostname1
*object
)
1052 g_object_get (G_OBJECT (object
), "pretty-hostname", &value
, NULL
);
1057 * hostnamed_hostname1_set_pretty_hostname: (skip)
1058 * @object: A #hostnamedHostname1.
1059 * @value: The value to set.
1061 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.PrettyHostname">"PrettyHostname"</link> D-Bus property to @value.
1063 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1066 hostnamed_hostname1_set_pretty_hostname (hostnamedHostname1
*object
, const gchar
*value
)
1068 g_object_set (G_OBJECT (object
), "pretty-hostname", value
, NULL
);
1072 * hostnamed_hostname1_get_icon_name: (skip)
1073 * @object: A #hostnamedHostname1.
1075 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.IconName">"IconName"</link> D-Bus property.
1077 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1079 * <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 hostnamed_hostname1_dup_icon_name() if on another thread.</warning>
1081 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1084 hostnamed_hostname1_get_icon_name (hostnamedHostname1
*object
)
1086 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_icon_name (object
);
1090 * hostnamed_hostname1_dup_icon_name: (skip)
1091 * @object: A #hostnamedHostname1.
1093 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.IconName">"IconName"</link> D-Bus property.
1095 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1097 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1100 hostnamed_hostname1_dup_icon_name (hostnamedHostname1
*object
)
1103 g_object_get (G_OBJECT (object
), "icon-name", &value
, NULL
);
1108 * hostnamed_hostname1_set_icon_name: (skip)
1109 * @object: A #hostnamedHostname1.
1110 * @value: The value to set.
1112 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.IconName">"IconName"</link> D-Bus property to @value.
1114 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1117 hostnamed_hostname1_set_icon_name (hostnamedHostname1
*object
, const gchar
*value
)
1119 g_object_set (G_OBJECT (object
), "icon-name", value
, NULL
);
1123 * hostnamed_hostname1_get_chassis: (skip)
1124 * @object: A #hostnamedHostname1.
1126 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.Chassis">"Chassis"</link> D-Bus property.
1128 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1130 * <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 hostnamed_hostname1_dup_chassis() if on another thread.</warning>
1132 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1135 hostnamed_hostname1_get_chassis (hostnamedHostname1
*object
)
1137 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_chassis (object
);
1141 * hostnamed_hostname1_dup_chassis: (skip)
1142 * @object: A #hostnamedHostname1.
1144 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.Chassis">"Chassis"</link> D-Bus property.
1146 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1148 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1151 hostnamed_hostname1_dup_chassis (hostnamedHostname1
*object
)
1154 g_object_get (G_OBJECT (object
), "chassis", &value
, NULL
);
1159 * hostnamed_hostname1_set_chassis: (skip)
1160 * @object: A #hostnamedHostname1.
1161 * @value: The value to set.
1163 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.Chassis">"Chassis"</link> D-Bus property to @value.
1165 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1168 hostnamed_hostname1_set_chassis (hostnamedHostname1
*object
, const gchar
*value
)
1170 g_object_set (G_OBJECT (object
), "chassis", value
, NULL
);
1174 * hostnamed_hostname1_get_kernel_name: (skip)
1175 * @object: A #hostnamedHostname1.
1177 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelName">"KernelName"</link> D-Bus property.
1179 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1181 * <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 hostnamed_hostname1_dup_kernel_name() if on another thread.</warning>
1183 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1186 hostnamed_hostname1_get_kernel_name (hostnamedHostname1
*object
)
1188 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_kernel_name (object
);
1192 * hostnamed_hostname1_dup_kernel_name: (skip)
1193 * @object: A #hostnamedHostname1.
1195 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelName">"KernelName"</link> D-Bus property.
1197 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1199 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1202 hostnamed_hostname1_dup_kernel_name (hostnamedHostname1
*object
)
1205 g_object_get (G_OBJECT (object
), "kernel-name", &value
, NULL
);
1210 * hostnamed_hostname1_set_kernel_name: (skip)
1211 * @object: A #hostnamedHostname1.
1212 * @value: The value to set.
1214 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelName">"KernelName"</link> D-Bus property to @value.
1216 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1219 hostnamed_hostname1_set_kernel_name (hostnamedHostname1
*object
, const gchar
*value
)
1221 g_object_set (G_OBJECT (object
), "kernel-name", value
, NULL
);
1225 * hostnamed_hostname1_get_kernel_release: (skip)
1226 * @object: A #hostnamedHostname1.
1228 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelRelease">"KernelRelease"</link> D-Bus property.
1230 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1232 * <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 hostnamed_hostname1_dup_kernel_release() if on another thread.</warning>
1234 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1237 hostnamed_hostname1_get_kernel_release (hostnamedHostname1
*object
)
1239 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_kernel_release (object
);
1243 * hostnamed_hostname1_dup_kernel_release: (skip)
1244 * @object: A #hostnamedHostname1.
1246 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelRelease">"KernelRelease"</link> D-Bus property.
1248 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1250 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1253 hostnamed_hostname1_dup_kernel_release (hostnamedHostname1
*object
)
1256 g_object_get (G_OBJECT (object
), "kernel-release", &value
, NULL
);
1261 * hostnamed_hostname1_set_kernel_release: (skip)
1262 * @object: A #hostnamedHostname1.
1263 * @value: The value to set.
1265 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelRelease">"KernelRelease"</link> D-Bus property to @value.
1267 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1270 hostnamed_hostname1_set_kernel_release (hostnamedHostname1
*object
, const gchar
*value
)
1272 g_object_set (G_OBJECT (object
), "kernel-release", value
, NULL
);
1276 * hostnamed_hostname1_get_kernel_version: (skip)
1277 * @object: A #hostnamedHostname1.
1279 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelVersion">"KernelVersion"</link> D-Bus property.
1281 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1283 * <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 hostnamed_hostname1_dup_kernel_version() if on another thread.</warning>
1285 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1288 hostnamed_hostname1_get_kernel_version (hostnamedHostname1
*object
)
1290 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_kernel_version (object
);
1294 * hostnamed_hostname1_dup_kernel_version: (skip)
1295 * @object: A #hostnamedHostname1.
1297 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelVersion">"KernelVersion"</link> D-Bus property.
1299 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1301 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1304 hostnamed_hostname1_dup_kernel_version (hostnamedHostname1
*object
)
1307 g_object_get (G_OBJECT (object
), "kernel-version", &value
, NULL
);
1312 * hostnamed_hostname1_set_kernel_version: (skip)
1313 * @object: A #hostnamedHostname1.
1314 * @value: The value to set.
1316 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.KernelVersion">"KernelVersion"</link> D-Bus property to @value.
1318 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1321 hostnamed_hostname1_set_kernel_version (hostnamedHostname1
*object
, const gchar
*value
)
1323 g_object_set (G_OBJECT (object
), "kernel-version", value
, NULL
);
1327 * hostnamed_hostname1_get_operating_system_pretty_name: (skip)
1328 * @object: A #hostnamedHostname1.
1330 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemPrettyName">"OperatingSystemPrettyName"</link> D-Bus property.
1332 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1334 * <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 hostnamed_hostname1_dup_operating_system_pretty_name() if on another thread.</warning>
1336 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1339 hostnamed_hostname1_get_operating_system_pretty_name (hostnamedHostname1
*object
)
1341 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_operating_system_pretty_name (object
);
1345 * hostnamed_hostname1_dup_operating_system_pretty_name: (skip)
1346 * @object: A #hostnamedHostname1.
1348 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemPrettyName">"OperatingSystemPrettyName"</link> D-Bus property.
1350 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1352 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1355 hostnamed_hostname1_dup_operating_system_pretty_name (hostnamedHostname1
*object
)
1358 g_object_get (G_OBJECT (object
), "operating-system-pretty-name", &value
, NULL
);
1363 * hostnamed_hostname1_set_operating_system_pretty_name: (skip)
1364 * @object: A #hostnamedHostname1.
1365 * @value: The value to set.
1367 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemPrettyName">"OperatingSystemPrettyName"</link> D-Bus property to @value.
1369 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1372 hostnamed_hostname1_set_operating_system_pretty_name (hostnamedHostname1
*object
, const gchar
*value
)
1374 g_object_set (G_OBJECT (object
), "operating-system-pretty-name", value
, NULL
);
1378 * hostnamed_hostname1_get_operating_system_cpename: (skip)
1379 * @object: A #hostnamedHostname1.
1381 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemCPEName">"OperatingSystemCPEName"</link> D-Bus property.
1383 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1385 * <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 hostnamed_hostname1_dup_operating_system_cpename() if on another thread.</warning>
1387 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1390 hostnamed_hostname1_get_operating_system_cpename (hostnamedHostname1
*object
)
1392 return HOSTNAMED_HOSTNAME1_GET_IFACE (object
)->get_operating_system_cpename (object
);
1396 * hostnamed_hostname1_dup_operating_system_cpename: (skip)
1397 * @object: A #hostnamedHostname1.
1399 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemCPEName">"OperatingSystemCPEName"</link> D-Bus property.
1401 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1403 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
1406 hostnamed_hostname1_dup_operating_system_cpename (hostnamedHostname1
*object
)
1409 g_object_get (G_OBJECT (object
), "operating-system-cpename", &value
, NULL
);
1414 * hostnamed_hostname1_set_operating_system_cpename: (skip)
1415 * @object: A #hostnamedHostname1.
1416 * @value: The value to set.
1418 * Sets the <link linkend="gdbus-property-org-freedesktop-hostname1.OperatingSystemCPEName">"OperatingSystemCPEName"</link> D-Bus property to @value.
1420 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1423 hostnamed_hostname1_set_operating_system_cpename (hostnamedHostname1
*object
, const gchar
*value
)
1425 g_object_set (G_OBJECT (object
), "operating-system-cpename", value
, NULL
);
1429 * hostnamed_hostname1_call_set_hostname:
1430 * @proxy: A #hostnamedHostname1Proxy.
1431 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1432 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1433 * @cancellable: (allow-none): A #GCancellable or %NULL.
1434 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1435 * @user_data: User data to pass to @callback.
1437 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetHostname">SetHostname()</link> D-Bus method on @proxy.
1438 * 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.
1439 * You can then call hostnamed_hostname1_call_set_hostname_finish() to get the result of the operation.
1441 * See hostnamed_hostname1_call_set_hostname_sync() for the synchronous, blocking version of this method.
1444 hostnamed_hostname1_call_set_hostname (
1445 hostnamedHostname1
*proxy
,
1446 const gchar
*arg_unnamed_arg0
,
1447 gboolean arg_unnamed_arg1
,
1448 GCancellable
*cancellable
,
1449 GAsyncReadyCallback callback
,
1452 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1454 g_variant_new ("(sb)",
1457 G_DBUS_CALL_FLAGS_NONE
,
1465 * hostnamed_hostname1_call_set_hostname_finish:
1466 * @proxy: A #hostnamedHostname1Proxy.
1467 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_call_set_hostname().
1468 * @error: Return location for error or %NULL.
1470 * Finishes an operation started with hostnamed_hostname1_call_set_hostname().
1472 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1475 hostnamed_hostname1_call_set_hostname_finish (
1476 hostnamedHostname1
*proxy
,
1481 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1484 g_variant_get (_ret
,
1486 g_variant_unref (_ret
);
1488 return _ret
!= NULL
;
1492 * hostnamed_hostname1_call_set_hostname_sync:
1493 * @proxy: A #hostnamedHostname1Proxy.
1494 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1495 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1496 * @cancellable: (allow-none): A #GCancellable or %NULL.
1497 * @error: Return location for error or %NULL.
1499 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetHostname">SetHostname()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1501 * See hostnamed_hostname1_call_set_hostname() for the asynchronous version of this method.
1503 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1506 hostnamed_hostname1_call_set_hostname_sync (
1507 hostnamedHostname1
*proxy
,
1508 const gchar
*arg_unnamed_arg0
,
1509 gboolean arg_unnamed_arg1
,
1510 GCancellable
*cancellable
,
1514 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1516 g_variant_new ("(sb)",
1519 G_DBUS_CALL_FLAGS_NONE
,
1525 g_variant_get (_ret
,
1527 g_variant_unref (_ret
);
1529 return _ret
!= NULL
;
1533 * hostnamed_hostname1_call_set_static_hostname:
1534 * @proxy: A #hostnamedHostname1Proxy.
1535 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1536 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1537 * @cancellable: (allow-none): A #GCancellable or %NULL.
1538 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1539 * @user_data: User data to pass to @callback.
1541 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetStaticHostname">SetStaticHostname()</link> D-Bus method on @proxy.
1542 * 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.
1543 * You can then call hostnamed_hostname1_call_set_static_hostname_finish() to get the result of the operation.
1545 * See hostnamed_hostname1_call_set_static_hostname_sync() for the synchronous, blocking version of this method.
1548 hostnamed_hostname1_call_set_static_hostname (
1549 hostnamedHostname1
*proxy
,
1550 const gchar
*arg_unnamed_arg0
,
1551 gboolean arg_unnamed_arg1
,
1552 GCancellable
*cancellable
,
1553 GAsyncReadyCallback callback
,
1556 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1557 "SetStaticHostname",
1558 g_variant_new ("(sb)",
1561 G_DBUS_CALL_FLAGS_NONE
,
1569 * hostnamed_hostname1_call_set_static_hostname_finish:
1570 * @proxy: A #hostnamedHostname1Proxy.
1571 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_call_set_static_hostname().
1572 * @error: Return location for error or %NULL.
1574 * Finishes an operation started with hostnamed_hostname1_call_set_static_hostname().
1576 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1579 hostnamed_hostname1_call_set_static_hostname_finish (
1580 hostnamedHostname1
*proxy
,
1585 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1588 g_variant_get (_ret
,
1590 g_variant_unref (_ret
);
1592 return _ret
!= NULL
;
1596 * hostnamed_hostname1_call_set_static_hostname_sync:
1597 * @proxy: A #hostnamedHostname1Proxy.
1598 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1599 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1600 * @cancellable: (allow-none): A #GCancellable or %NULL.
1601 * @error: Return location for error or %NULL.
1603 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetStaticHostname">SetStaticHostname()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1605 * See hostnamed_hostname1_call_set_static_hostname() for the asynchronous version of this method.
1607 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1610 hostnamed_hostname1_call_set_static_hostname_sync (
1611 hostnamedHostname1
*proxy
,
1612 const gchar
*arg_unnamed_arg0
,
1613 gboolean arg_unnamed_arg1
,
1614 GCancellable
*cancellable
,
1618 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1619 "SetStaticHostname",
1620 g_variant_new ("(sb)",
1623 G_DBUS_CALL_FLAGS_NONE
,
1629 g_variant_get (_ret
,
1631 g_variant_unref (_ret
);
1633 return _ret
!= NULL
;
1637 * hostnamed_hostname1_call_set_pretty_hostname:
1638 * @proxy: A #hostnamedHostname1Proxy.
1639 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1640 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1641 * @cancellable: (allow-none): A #GCancellable or %NULL.
1642 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1643 * @user_data: User data to pass to @callback.
1645 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetPrettyHostname">SetPrettyHostname()</link> D-Bus method on @proxy.
1646 * 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.
1647 * You can then call hostnamed_hostname1_call_set_pretty_hostname_finish() to get the result of the operation.
1649 * See hostnamed_hostname1_call_set_pretty_hostname_sync() for the synchronous, blocking version of this method.
1652 hostnamed_hostname1_call_set_pretty_hostname (
1653 hostnamedHostname1
*proxy
,
1654 const gchar
*arg_unnamed_arg0
,
1655 gboolean arg_unnamed_arg1
,
1656 GCancellable
*cancellable
,
1657 GAsyncReadyCallback callback
,
1660 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1661 "SetPrettyHostname",
1662 g_variant_new ("(sb)",
1665 G_DBUS_CALL_FLAGS_NONE
,
1673 * hostnamed_hostname1_call_set_pretty_hostname_finish:
1674 * @proxy: A #hostnamedHostname1Proxy.
1675 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_call_set_pretty_hostname().
1676 * @error: Return location for error or %NULL.
1678 * Finishes an operation started with hostnamed_hostname1_call_set_pretty_hostname().
1680 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1683 hostnamed_hostname1_call_set_pretty_hostname_finish (
1684 hostnamedHostname1
*proxy
,
1689 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1692 g_variant_get (_ret
,
1694 g_variant_unref (_ret
);
1696 return _ret
!= NULL
;
1700 * hostnamed_hostname1_call_set_pretty_hostname_sync:
1701 * @proxy: A #hostnamedHostname1Proxy.
1702 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1703 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1704 * @cancellable: (allow-none): A #GCancellable or %NULL.
1705 * @error: Return location for error or %NULL.
1707 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetPrettyHostname">SetPrettyHostname()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1709 * See hostnamed_hostname1_call_set_pretty_hostname() for the asynchronous version of this method.
1711 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1714 hostnamed_hostname1_call_set_pretty_hostname_sync (
1715 hostnamedHostname1
*proxy
,
1716 const gchar
*arg_unnamed_arg0
,
1717 gboolean arg_unnamed_arg1
,
1718 GCancellable
*cancellable
,
1722 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1723 "SetPrettyHostname",
1724 g_variant_new ("(sb)",
1727 G_DBUS_CALL_FLAGS_NONE
,
1733 g_variant_get (_ret
,
1735 g_variant_unref (_ret
);
1737 return _ret
!= NULL
;
1741 * hostnamed_hostname1_call_set_icon_name:
1742 * @proxy: A #hostnamedHostname1Proxy.
1743 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1744 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1745 * @cancellable: (allow-none): A #GCancellable or %NULL.
1746 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1747 * @user_data: User data to pass to @callback.
1749 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetIconName">SetIconName()</link> D-Bus method on @proxy.
1750 * 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.
1751 * You can then call hostnamed_hostname1_call_set_icon_name_finish() to get the result of the operation.
1753 * See hostnamed_hostname1_call_set_icon_name_sync() for the synchronous, blocking version of this method.
1756 hostnamed_hostname1_call_set_icon_name (
1757 hostnamedHostname1
*proxy
,
1758 const gchar
*arg_unnamed_arg0
,
1759 gboolean arg_unnamed_arg1
,
1760 GCancellable
*cancellable
,
1761 GAsyncReadyCallback callback
,
1764 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1766 g_variant_new ("(sb)",
1769 G_DBUS_CALL_FLAGS_NONE
,
1777 * hostnamed_hostname1_call_set_icon_name_finish:
1778 * @proxy: A #hostnamedHostname1Proxy.
1779 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_call_set_icon_name().
1780 * @error: Return location for error or %NULL.
1782 * Finishes an operation started with hostnamed_hostname1_call_set_icon_name().
1784 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1787 hostnamed_hostname1_call_set_icon_name_finish (
1788 hostnamedHostname1
*proxy
,
1793 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1796 g_variant_get (_ret
,
1798 g_variant_unref (_ret
);
1800 return _ret
!= NULL
;
1804 * hostnamed_hostname1_call_set_icon_name_sync:
1805 * @proxy: A #hostnamedHostname1Proxy.
1806 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1807 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1808 * @cancellable: (allow-none): A #GCancellable or %NULL.
1809 * @error: Return location for error or %NULL.
1811 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetIconName">SetIconName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1813 * See hostnamed_hostname1_call_set_icon_name() for the asynchronous version of this method.
1815 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1818 hostnamed_hostname1_call_set_icon_name_sync (
1819 hostnamedHostname1
*proxy
,
1820 const gchar
*arg_unnamed_arg0
,
1821 gboolean arg_unnamed_arg1
,
1822 GCancellable
*cancellable
,
1826 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1828 g_variant_new ("(sb)",
1831 G_DBUS_CALL_FLAGS_NONE
,
1837 g_variant_get (_ret
,
1839 g_variant_unref (_ret
);
1841 return _ret
!= NULL
;
1845 * hostnamed_hostname1_call_set_chassis:
1846 * @proxy: A #hostnamedHostname1Proxy.
1847 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1848 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1849 * @cancellable: (allow-none): A #GCancellable or %NULL.
1850 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1851 * @user_data: User data to pass to @callback.
1853 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetChassis">SetChassis()</link> D-Bus method on @proxy.
1854 * 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.
1855 * You can then call hostnamed_hostname1_call_set_chassis_finish() to get the result of the operation.
1857 * See hostnamed_hostname1_call_set_chassis_sync() for the synchronous, blocking version of this method.
1860 hostnamed_hostname1_call_set_chassis (
1861 hostnamedHostname1
*proxy
,
1862 const gchar
*arg_unnamed_arg0
,
1863 gboolean arg_unnamed_arg1
,
1864 GCancellable
*cancellable
,
1865 GAsyncReadyCallback callback
,
1868 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1870 g_variant_new ("(sb)",
1873 G_DBUS_CALL_FLAGS_NONE
,
1881 * hostnamed_hostname1_call_set_chassis_finish:
1882 * @proxy: A #hostnamedHostname1Proxy.
1883 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_call_set_chassis().
1884 * @error: Return location for error or %NULL.
1886 * Finishes an operation started with hostnamed_hostname1_call_set_chassis().
1888 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1891 hostnamed_hostname1_call_set_chassis_finish (
1892 hostnamedHostname1
*proxy
,
1897 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1900 g_variant_get (_ret
,
1902 g_variant_unref (_ret
);
1904 return _ret
!= NULL
;
1908 * hostnamed_hostname1_call_set_chassis_sync:
1909 * @proxy: A #hostnamedHostname1Proxy.
1910 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1911 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1912 * @cancellable: (allow-none): A #GCancellable or %NULL.
1913 * @error: Return location for error or %NULL.
1915 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-hostname1.SetChassis">SetChassis()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1917 * See hostnamed_hostname1_call_set_chassis() for the asynchronous version of this method.
1919 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1922 hostnamed_hostname1_call_set_chassis_sync (
1923 hostnamedHostname1
*proxy
,
1924 const gchar
*arg_unnamed_arg0
,
1925 gboolean arg_unnamed_arg1
,
1926 GCancellable
*cancellable
,
1930 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1932 g_variant_new ("(sb)",
1935 G_DBUS_CALL_FLAGS_NONE
,
1941 g_variant_get (_ret
,
1943 g_variant_unref (_ret
);
1945 return _ret
!= NULL
;
1949 * hostnamed_hostname1_complete_set_hostname:
1950 * @object: A #hostnamedHostname1.
1951 * @invocation: (transfer full): A #GDBusMethodInvocation.
1953 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-hostname1.SetHostname">SetHostname()</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.
1955 * This method will free @invocation, you cannot use it afterwards.
1958 hostnamed_hostname1_complete_set_hostname (
1959 hostnamedHostname1
*object
,
1960 GDBusMethodInvocation
*invocation
)
1962 g_dbus_method_invocation_return_value (invocation
,
1963 g_variant_new ("()"));
1967 * hostnamed_hostname1_complete_set_static_hostname:
1968 * @object: A #hostnamedHostname1.
1969 * @invocation: (transfer full): A #GDBusMethodInvocation.
1971 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-hostname1.SetStaticHostname">SetStaticHostname()</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.
1973 * This method will free @invocation, you cannot use it afterwards.
1976 hostnamed_hostname1_complete_set_static_hostname (
1977 hostnamedHostname1
*object
,
1978 GDBusMethodInvocation
*invocation
)
1980 g_dbus_method_invocation_return_value (invocation
,
1981 g_variant_new ("()"));
1985 * hostnamed_hostname1_complete_set_pretty_hostname:
1986 * @object: A #hostnamedHostname1.
1987 * @invocation: (transfer full): A #GDBusMethodInvocation.
1989 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-hostname1.SetPrettyHostname">SetPrettyHostname()</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.
1991 * This method will free @invocation, you cannot use it afterwards.
1994 hostnamed_hostname1_complete_set_pretty_hostname (
1995 hostnamedHostname1
*object
,
1996 GDBusMethodInvocation
*invocation
)
1998 g_dbus_method_invocation_return_value (invocation
,
1999 g_variant_new ("()"));
2003 * hostnamed_hostname1_complete_set_icon_name:
2004 * @object: A #hostnamedHostname1.
2005 * @invocation: (transfer full): A #GDBusMethodInvocation.
2007 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-hostname1.SetIconName">SetIconName()</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.
2009 * This method will free @invocation, you cannot use it afterwards.
2012 hostnamed_hostname1_complete_set_icon_name (
2013 hostnamedHostname1
*object
,
2014 GDBusMethodInvocation
*invocation
)
2016 g_dbus_method_invocation_return_value (invocation
,
2017 g_variant_new ("()"));
2021 * hostnamed_hostname1_complete_set_chassis:
2022 * @object: A #hostnamedHostname1.
2023 * @invocation: (transfer full): A #GDBusMethodInvocation.
2025 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-hostname1.SetChassis">SetChassis()</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.
2027 * This method will free @invocation, you cannot use it afterwards.
2030 hostnamed_hostname1_complete_set_chassis (
2031 hostnamedHostname1
*object
,
2032 GDBusMethodInvocation
*invocation
)
2034 g_dbus_method_invocation_return_value (invocation
,
2035 g_variant_new ("()"));
2038 /* ------------------------------------------------------------------------ */
2041 * hostnamedHostname1Proxy:
2043 * The #hostnamedHostname1Proxy structure contains only private data and should only be accessed using the provided API.
2047 * hostnamedHostname1ProxyClass:
2048 * @parent_class: The parent class.
2050 * Class structure for #hostnamedHostname1Proxy.
2053 struct _hostnamedHostname1ProxyPrivate
2058 static void hostnamed_hostname1_proxy_iface_init (hostnamedHostname1Iface
*iface
);
2060 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
2061 G_DEFINE_TYPE_WITH_CODE (hostnamedHostname1Proxy
, hostnamed_hostname1_proxy
, G_TYPE_DBUS_PROXY
,
2062 G_ADD_PRIVATE (hostnamedHostname1Proxy
)
2063 G_IMPLEMENT_INTERFACE (HOSTNAMED_TYPE_HOSTNAME1
, hostnamed_hostname1_proxy_iface_init
));
2066 G_DEFINE_TYPE_WITH_CODE (hostnamedHostname1Proxy
, hostnamed_hostname1_proxy
, G_TYPE_DBUS_PROXY
,
2067 G_IMPLEMENT_INTERFACE (HOSTNAMED_TYPE_HOSTNAME1
, hostnamed_hostname1_proxy_iface_init
));
2071 hostnamed_hostname1_proxy_finalize (GObject
*object
)
2073 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2074 g_datalist_clear (&proxy
->priv
->qdata
);
2075 G_OBJECT_CLASS (hostnamed_hostname1_proxy_parent_class
)->finalize (object
);
2079 hostnamed_hostname1_proxy_get_property (GObject
*object
,
2082 GParamSpec
*pspec G_GNUC_UNUSED
)
2084 const _ExtendedGDBusPropertyInfo
*info
;
2086 g_assert (prop_id
!= 0 && prop_id
- 1 < 10);
2087 info
= _hostnamed_hostname1_property_info_pointers
[prop_id
- 1];
2088 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object
), info
->parent_struct
.name
);
2089 if (info
->use_gvariant
)
2091 g_value_set_variant (value
, variant
);
2095 if (variant
!= NULL
)
2096 g_dbus_gvariant_to_gvalue (variant
, value
);
2098 if (variant
!= NULL
)
2099 g_variant_unref (variant
);
2103 hostnamed_hostname1_proxy_set_property_cb (GDBusProxy
*proxy
,
2107 const _ExtendedGDBusPropertyInfo
*info
= user_data
;
2111 _ret
= g_dbus_proxy_call_finish (proxy
, res
, &error
);
2114 g_warning ("Error setting property '%s' on interface org.freedesktop.hostname1: %s (%s, %d)",
2115 info
->parent_struct
.name
,
2116 error
->message
, g_quark_to_string (error
->domain
), error
->code
);
2117 g_error_free (error
);
2121 g_variant_unref (_ret
);
2126 hostnamed_hostname1_proxy_set_property (GObject
*object
,
2128 const GValue
*value
,
2129 GParamSpec
*pspec G_GNUC_UNUSED
)
2131 const _ExtendedGDBusPropertyInfo
*info
;
2133 g_assert (prop_id
!= 0 && prop_id
- 1 < 10);
2134 info
= _hostnamed_hostname1_property_info_pointers
[prop_id
- 1];
2135 variant
= g_dbus_gvalue_to_gvariant (value
, G_VARIANT_TYPE (info
->parent_struct
.signature
));
2136 g_dbus_proxy_call (G_DBUS_PROXY (object
),
2137 "org.freedesktop.DBus.Properties.Set",
2138 g_variant_new ("(ssv)", "org.freedesktop.hostname1", info
->parent_struct
.name
, variant
),
2139 G_DBUS_CALL_FLAGS_NONE
,
2141 NULL
, (GAsyncReadyCallback
) hostnamed_hostname1_proxy_set_property_cb
, (GDBusPropertyInfo
*) &info
->parent_struct
);
2142 g_variant_unref (variant
);
2146 hostnamed_hostname1_proxy_g_signal (GDBusProxy
*proxy
,
2147 const gchar
*sender_name G_GNUC_UNUSED
,
2148 const gchar
*signal_name
,
2149 GVariant
*parameters
)
2151 _ExtendedGDBusSignalInfo
*info
;
2158 info
= (_ExtendedGDBusSignalInfo
*) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo
*) &_hostnamed_hostname1_interface_info
.parent_struct
, signal_name
);
2161 num_params
= g_variant_n_children (parameters
);
2162 paramv
= g_new0 (GValue
, num_params
+ 1);
2163 g_value_init (¶mv
[0], HOSTNAMED_TYPE_HOSTNAME1
);
2164 g_value_set_object (¶mv
[0], proxy
);
2165 g_variant_iter_init (&iter
, parameters
);
2167 while ((child
= g_variant_iter_next_value (&iter
)) != NULL
)
2169 _ExtendedGDBusArgInfo
*arg_info
= (_ExtendedGDBusArgInfo
*) info
->parent_struct
.args
[n
- 1];
2170 if (arg_info
->use_gvariant
)
2172 g_value_init (¶mv
[n
], G_TYPE_VARIANT
);
2173 g_value_set_variant (¶mv
[n
], child
);
2177 g_dbus_gvariant_to_gvalue (child
, ¶mv
[n
++]);
2178 g_variant_unref (child
);
2180 signal_id
= g_signal_lookup (info
->signal_name
, HOSTNAMED_TYPE_HOSTNAME1
);
2181 g_signal_emitv (paramv
, signal_id
, 0, NULL
);
2182 for (n
= 0; n
< num_params
+ 1; n
++)
2183 g_value_unset (¶mv
[n
]);
2188 hostnamed_hostname1_proxy_g_properties_changed (GDBusProxy
*_proxy
,
2189 GVariant
*changed_properties
,
2190 const gchar
*const *invalidated_properties
)
2192 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (_proxy
);
2196 _ExtendedGDBusPropertyInfo
*info
;
2197 g_variant_get (changed_properties
, "a{sv}", &iter
);
2198 while (g_variant_iter_next (iter
, "{&sv}", &key
, NULL
))
2200 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_hostnamed_hostname1_interface_info
.parent_struct
, key
);
2201 g_datalist_remove_data (&proxy
->priv
->qdata
, key
);
2203 g_object_notify (G_OBJECT (proxy
), info
->hyphen_name
);
2205 g_variant_iter_free (iter
);
2206 for (n
= 0; invalidated_properties
[n
] != NULL
; n
++)
2208 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_hostnamed_hostname1_interface_info
.parent_struct
, invalidated_properties
[n
]);
2209 g_datalist_remove_data (&proxy
->priv
->qdata
, invalidated_properties
[n
]);
2211 g_object_notify (G_OBJECT (proxy
), info
->hyphen_name
);
2215 static const gchar
*
2216 hostnamed_hostname1_proxy_get_hostname (hostnamedHostname1
*object
)
2218 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2220 const gchar
*value
= NULL
;
2221 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "Hostname");
2222 if (variant
!= NULL
)
2224 value
= g_variant_get_string (variant
, NULL
);
2225 g_variant_unref (variant
);
2230 static const gchar
*
2231 hostnamed_hostname1_proxy_get_static_hostname (hostnamedHostname1
*object
)
2233 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2235 const gchar
*value
= NULL
;
2236 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "StaticHostname");
2237 if (variant
!= NULL
)
2239 value
= g_variant_get_string (variant
, NULL
);
2240 g_variant_unref (variant
);
2245 static const gchar
*
2246 hostnamed_hostname1_proxy_get_pretty_hostname (hostnamedHostname1
*object
)
2248 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2250 const gchar
*value
= NULL
;
2251 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "PrettyHostname");
2252 if (variant
!= NULL
)
2254 value
= g_variant_get_string (variant
, NULL
);
2255 g_variant_unref (variant
);
2260 static const gchar
*
2261 hostnamed_hostname1_proxy_get_icon_name (hostnamedHostname1
*object
)
2263 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2265 const gchar
*value
= NULL
;
2266 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "IconName");
2267 if (variant
!= NULL
)
2269 value
= g_variant_get_string (variant
, NULL
);
2270 g_variant_unref (variant
);
2275 static const gchar
*
2276 hostnamed_hostname1_proxy_get_chassis (hostnamedHostname1
*object
)
2278 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2280 const gchar
*value
= NULL
;
2281 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "Chassis");
2282 if (variant
!= NULL
)
2284 value
= g_variant_get_string (variant
, NULL
);
2285 g_variant_unref (variant
);
2290 static const gchar
*
2291 hostnamed_hostname1_proxy_get_kernel_name (hostnamedHostname1
*object
)
2293 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2295 const gchar
*value
= NULL
;
2296 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "KernelName");
2297 if (variant
!= NULL
)
2299 value
= g_variant_get_string (variant
, NULL
);
2300 g_variant_unref (variant
);
2305 static const gchar
*
2306 hostnamed_hostname1_proxy_get_kernel_release (hostnamedHostname1
*object
)
2308 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2310 const gchar
*value
= NULL
;
2311 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "KernelRelease");
2312 if (variant
!= NULL
)
2314 value
= g_variant_get_string (variant
, NULL
);
2315 g_variant_unref (variant
);
2320 static const gchar
*
2321 hostnamed_hostname1_proxy_get_kernel_version (hostnamedHostname1
*object
)
2323 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2325 const gchar
*value
= NULL
;
2326 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "KernelVersion");
2327 if (variant
!= NULL
)
2329 value
= g_variant_get_string (variant
, NULL
);
2330 g_variant_unref (variant
);
2335 static const gchar
*
2336 hostnamed_hostname1_proxy_get_operating_system_pretty_name (hostnamedHostname1
*object
)
2338 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2340 const gchar
*value
= NULL
;
2341 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "OperatingSystemPrettyName");
2342 if (variant
!= NULL
)
2344 value
= g_variant_get_string (variant
, NULL
);
2345 g_variant_unref (variant
);
2350 static const gchar
*
2351 hostnamed_hostname1_proxy_get_operating_system_cpename (hostnamedHostname1
*object
)
2353 hostnamedHostname1Proxy
*proxy
= HOSTNAMED_HOSTNAME1_PROXY (object
);
2355 const gchar
*value
= NULL
;
2356 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "OperatingSystemCPEName");
2357 if (variant
!= NULL
)
2359 value
= g_variant_get_string (variant
, NULL
);
2360 g_variant_unref (variant
);
2366 hostnamed_hostname1_proxy_init (hostnamedHostname1Proxy
*proxy
)
2368 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
2369 proxy
->priv
= hostnamed_hostname1_proxy_get_instance_private (proxy
);
2371 proxy
->priv
= G_TYPE_INSTANCE_GET_PRIVATE (proxy
, HOSTNAMED_TYPE_HOSTNAME1_PROXY
, hostnamedHostname1ProxyPrivate
);
2374 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy
), hostnamed_hostname1_interface_info ());
2378 hostnamed_hostname1_proxy_class_init (hostnamedHostname1ProxyClass
*klass
)
2380 GObjectClass
*gobject_class
;
2381 GDBusProxyClass
*proxy_class
;
2383 gobject_class
= G_OBJECT_CLASS (klass
);
2384 gobject_class
->finalize
= hostnamed_hostname1_proxy_finalize
;
2385 gobject_class
->get_property
= hostnamed_hostname1_proxy_get_property
;
2386 gobject_class
->set_property
= hostnamed_hostname1_proxy_set_property
;
2388 proxy_class
= G_DBUS_PROXY_CLASS (klass
);
2389 proxy_class
->g_signal
= hostnamed_hostname1_proxy_g_signal
;
2390 proxy_class
->g_properties_changed
= hostnamed_hostname1_proxy_g_properties_changed
;
2392 hostnamed_hostname1_override_properties (gobject_class
, 1);
2394 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
2395 g_type_class_add_private (klass
, sizeof (hostnamedHostname1ProxyPrivate
));
2400 hostnamed_hostname1_proxy_iface_init (hostnamedHostname1Iface
*iface
)
2402 iface
->get_hostname
= hostnamed_hostname1_proxy_get_hostname
;
2403 iface
->get_static_hostname
= hostnamed_hostname1_proxy_get_static_hostname
;
2404 iface
->get_pretty_hostname
= hostnamed_hostname1_proxy_get_pretty_hostname
;
2405 iface
->get_icon_name
= hostnamed_hostname1_proxy_get_icon_name
;
2406 iface
->get_chassis
= hostnamed_hostname1_proxy_get_chassis
;
2407 iface
->get_kernel_name
= hostnamed_hostname1_proxy_get_kernel_name
;
2408 iface
->get_kernel_release
= hostnamed_hostname1_proxy_get_kernel_release
;
2409 iface
->get_kernel_version
= hostnamed_hostname1_proxy_get_kernel_version
;
2410 iface
->get_operating_system_pretty_name
= hostnamed_hostname1_proxy_get_operating_system_pretty_name
;
2411 iface
->get_operating_system_cpename
= hostnamed_hostname1_proxy_get_operating_system_cpename
;
2415 * hostnamed_hostname1_proxy_new:
2416 * @connection: A #GDBusConnection.
2417 * @flags: Flags from the #GDBusProxyFlags enumeration.
2418 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
2419 * @object_path: An object path.
2420 * @cancellable: (allow-none): A #GCancellable or %NULL.
2421 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
2422 * @user_data: User data to pass to @callback.
2424 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link>. See g_dbus_proxy_new() for more details.
2426 * 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.
2427 * You can then call hostnamed_hostname1_proxy_new_finish() to get the result of the operation.
2429 * See hostnamed_hostname1_proxy_new_sync() for the synchronous, blocking version of this constructor.
2432 hostnamed_hostname1_proxy_new (
2433 GDBusConnection
*connection
,
2434 GDBusProxyFlags flags
,
2436 const gchar
*object_path
,
2437 GCancellable
*cancellable
,
2438 GAsyncReadyCallback callback
,
2441 g_async_initable_new_async (HOSTNAMED_TYPE_HOSTNAME1_PROXY
, G_PRIORITY_DEFAULT
, cancellable
, callback
, user_data
, "g-flags", flags
, "g-name", name
, "g-connection", connection
, "g-object-path", object_path
, "g-interface-name", "org.freedesktop.hostname1", NULL
);
2445 * hostnamed_hostname1_proxy_new_finish:
2446 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_proxy_new().
2447 * @error: Return location for error or %NULL
2449 * Finishes an operation started with hostnamed_hostname1_proxy_new().
2451 * Returns: (transfer full) (type hostnamedHostname1Proxy): The constructed proxy object or %NULL if @error is set.
2453 hostnamedHostname1
*
2454 hostnamed_hostname1_proxy_new_finish (
2459 GObject
*source_object
;
2460 source_object
= g_async_result_get_source_object (res
);
2461 ret
= g_async_initable_new_finish (G_ASYNC_INITABLE (source_object
), res
, error
);
2462 g_object_unref (source_object
);
2464 return HOSTNAMED_HOSTNAME1 (ret
);
2470 * hostnamed_hostname1_proxy_new_sync:
2471 * @connection: A #GDBusConnection.
2472 * @flags: Flags from the #GDBusProxyFlags enumeration.
2473 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
2474 * @object_path: An object path.
2475 * @cancellable: (allow-none): A #GCancellable or %NULL.
2476 * @error: Return location for error or %NULL
2478 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link>. See g_dbus_proxy_new_sync() for more details.
2480 * The calling thread is blocked until a reply is received.
2482 * See hostnamed_hostname1_proxy_new() for the asynchronous version of this constructor.
2484 * Returns: (transfer full) (type hostnamedHostname1Proxy): The constructed proxy object or %NULL if @error is set.
2486 hostnamedHostname1
*
2487 hostnamed_hostname1_proxy_new_sync (
2488 GDBusConnection
*connection
,
2489 GDBusProxyFlags flags
,
2491 const gchar
*object_path
,
2492 GCancellable
*cancellable
,
2496 ret
= g_initable_new (HOSTNAMED_TYPE_HOSTNAME1_PROXY
, cancellable
, error
, "g-flags", flags
, "g-name", name
, "g-connection", connection
, "g-object-path", object_path
, "g-interface-name", "org.freedesktop.hostname1", NULL
);
2498 return HOSTNAMED_HOSTNAME1 (ret
);
2505 * hostnamed_hostname1_proxy_new_for_bus:
2506 * @bus_type: A #GBusType.
2507 * @flags: Flags from the #GDBusProxyFlags enumeration.
2508 * @name: A bus name (well-known or unique).
2509 * @object_path: An object path.
2510 * @cancellable: (allow-none): A #GCancellable or %NULL.
2511 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
2512 * @user_data: User data to pass to @callback.
2514 * Like hostnamed_hostname1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
2516 * 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.
2517 * You can then call hostnamed_hostname1_proxy_new_for_bus_finish() to get the result of the operation.
2519 * See hostnamed_hostname1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
2522 hostnamed_hostname1_proxy_new_for_bus (
2524 GDBusProxyFlags flags
,
2526 const gchar
*object_path
,
2527 GCancellable
*cancellable
,
2528 GAsyncReadyCallback callback
,
2531 g_async_initable_new_async (HOSTNAMED_TYPE_HOSTNAME1_PROXY
, G_PRIORITY_DEFAULT
, cancellable
, callback
, user_data
, "g-flags", flags
, "g-name", name
, "g-bus-type", bus_type
, "g-object-path", object_path
, "g-interface-name", "org.freedesktop.hostname1", NULL
);
2535 * hostnamed_hostname1_proxy_new_for_bus_finish:
2536 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostnamed_hostname1_proxy_new_for_bus().
2537 * @error: Return location for error or %NULL
2539 * Finishes an operation started with hostnamed_hostname1_proxy_new_for_bus().
2541 * Returns: (transfer full) (type hostnamedHostname1Proxy): The constructed proxy object or %NULL if @error is set.
2543 hostnamedHostname1
*
2544 hostnamed_hostname1_proxy_new_for_bus_finish (
2549 GObject
*source_object
;
2550 source_object
= g_async_result_get_source_object (res
);
2551 ret
= g_async_initable_new_finish (G_ASYNC_INITABLE (source_object
), res
, error
);
2552 g_object_unref (source_object
);
2554 return HOSTNAMED_HOSTNAME1 (ret
);
2560 * hostnamed_hostname1_proxy_new_for_bus_sync:
2561 * @bus_type: A #GBusType.
2562 * @flags: Flags from the #GDBusProxyFlags enumeration.
2563 * @name: A bus name (well-known or unique).
2564 * @object_path: An object path.
2565 * @cancellable: (allow-none): A #GCancellable or %NULL.
2566 * @error: Return location for error or %NULL
2568 * Like hostnamed_hostname1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
2570 * The calling thread is blocked until a reply is received.
2572 * See hostnamed_hostname1_proxy_new_for_bus() for the asynchronous version of this constructor.
2574 * Returns: (transfer full) (type hostnamedHostname1Proxy): The constructed proxy object or %NULL if @error is set.
2576 hostnamedHostname1
*
2577 hostnamed_hostname1_proxy_new_for_bus_sync (
2579 GDBusProxyFlags flags
,
2581 const gchar
*object_path
,
2582 GCancellable
*cancellable
,
2586 ret
= g_initable_new (HOSTNAMED_TYPE_HOSTNAME1_PROXY
, cancellable
, error
, "g-flags", flags
, "g-name", name
, "g-bus-type", bus_type
, "g-object-path", object_path
, "g-interface-name", "org.freedesktop.hostname1", NULL
);
2588 return HOSTNAMED_HOSTNAME1 (ret
);
2594 /* ------------------------------------------------------------------------ */
2597 * hostnamedHostname1Skeleton:
2599 * The #hostnamedHostname1Skeleton structure contains only private data and should only be accessed using the provided API.
2603 * hostnamedHostname1SkeletonClass:
2604 * @parent_class: The parent class.
2606 * Class structure for #hostnamedHostname1Skeleton.
2609 struct _hostnamedHostname1SkeletonPrivate
2612 GList
*changed_properties
;
2613 GSource
*changed_properties_idle_source
;
2614 GMainContext
*context
;
2619 _hostnamed_hostname1_skeleton_handle_method_call (
2620 GDBusConnection
*connection G_GNUC_UNUSED
,
2621 const gchar
*sender G_GNUC_UNUSED
,
2622 const gchar
*object_path G_GNUC_UNUSED
,
2623 const gchar
*interface_name
,
2624 const gchar
*method_name
,
2625 GVariant
*parameters
,
2626 GDBusMethodInvocation
*invocation
,
2629 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (user_data
);
2630 _ExtendedGDBusMethodInfo
*info
;
2638 GValue return_value
= G_VALUE_INIT
;
2639 info
= (_ExtendedGDBusMethodInfo
*) g_dbus_method_invocation_get_method_info (invocation
);
2640 g_assert (info
!= NULL
);
2641 num_params
= g_variant_n_children (parameters
);
2642 num_extra
= info
->pass_fdlist
? 3 : 2; paramv
= g_new0 (GValue
, num_params
+ num_extra
);
2644 g_value_init (¶mv
[n
], HOSTNAMED_TYPE_HOSTNAME1
);
2645 g_value_set_object (¶mv
[n
++], skeleton
);
2646 g_value_init (¶mv
[n
], G_TYPE_DBUS_METHOD_INVOCATION
);
2647 g_value_set_object (¶mv
[n
++], invocation
);
2648 if (info
->pass_fdlist
)
2651 g_value_init (¶mv
[n
], G_TYPE_UNIX_FD_LIST
);
2652 g_value_set_object (¶mv
[n
++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation
)));
2654 g_assert_not_reached ();
2657 g_variant_iter_init (&iter
, parameters
);
2658 while ((child
= g_variant_iter_next_value (&iter
)) != NULL
)
2660 _ExtendedGDBusArgInfo
*arg_info
= (_ExtendedGDBusArgInfo
*) info
->parent_struct
.in_args
[n
- num_extra
];
2661 if (arg_info
->use_gvariant
)
2663 g_value_init (¶mv
[n
], G_TYPE_VARIANT
);
2664 g_value_set_variant (¶mv
[n
], child
);
2668 g_dbus_gvariant_to_gvalue (child
, ¶mv
[n
++]);
2669 g_variant_unref (child
);
2671 signal_id
= g_signal_lookup (info
->signal_name
, HOSTNAMED_TYPE_HOSTNAME1
);
2672 g_value_init (&return_value
, G_TYPE_BOOLEAN
);
2673 g_signal_emitv (paramv
, signal_id
, 0, &return_value
);
2674 if (!g_value_get_boolean (&return_value
))
2675 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
);
2676 g_value_unset (&return_value
);
2677 for (n
= 0; n
< num_params
+ num_extra
; n
++)
2678 g_value_unset (¶mv
[n
]);
2683 _hostnamed_hostname1_skeleton_handle_get_property (
2684 GDBusConnection
*connection G_GNUC_UNUSED
,
2685 const gchar
*sender G_GNUC_UNUSED
,
2686 const gchar
*object_path G_GNUC_UNUSED
,
2687 const gchar
*interface_name G_GNUC_UNUSED
,
2688 const gchar
*property_name
,
2692 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (user_data
);
2693 GValue value
= G_VALUE_INIT
;
2695 _ExtendedGDBusPropertyInfo
*info
;
2698 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_hostnamed_hostname1_interface_info
.parent_struct
, property_name
);
2699 g_assert (info
!= NULL
);
2700 pspec
= g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton
), info
->hyphen_name
);
2703 g_set_error (error
, G_DBUS_ERROR
, G_DBUS_ERROR_INVALID_ARGS
, "No property with name %s", property_name
);
2707 g_value_init (&value
, pspec
->value_type
);
2708 g_object_get_property (G_OBJECT (skeleton
), info
->hyphen_name
, &value
);
2709 ret
= g_dbus_gvalue_to_gvariant (&value
, G_VARIANT_TYPE (info
->parent_struct
.signature
));
2710 g_value_unset (&value
);
2716 _hostnamed_hostname1_skeleton_handle_set_property (
2717 GDBusConnection
*connection G_GNUC_UNUSED
,
2718 const gchar
*sender G_GNUC_UNUSED
,
2719 const gchar
*object_path G_GNUC_UNUSED
,
2720 const gchar
*interface_name G_GNUC_UNUSED
,
2721 const gchar
*property_name
,
2726 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (user_data
);
2727 GValue value
= G_VALUE_INIT
;
2729 _ExtendedGDBusPropertyInfo
*info
;
2732 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_hostnamed_hostname1_interface_info
.parent_struct
, property_name
);
2733 g_assert (info
!= NULL
);
2734 pspec
= g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton
), info
->hyphen_name
);
2737 g_set_error (error
, G_DBUS_ERROR
, G_DBUS_ERROR_INVALID_ARGS
, "No property with name %s", property_name
);
2741 if (info
->use_gvariant
)
2742 g_value_set_variant (&value
, variant
);
2744 g_dbus_gvariant_to_gvalue (variant
, &value
);
2745 g_object_set_property (G_OBJECT (skeleton
), info
->hyphen_name
, &value
);
2746 g_value_unset (&value
);
2752 static const GDBusInterfaceVTable _hostnamed_hostname1_skeleton_vtable
=
2754 _hostnamed_hostname1_skeleton_handle_method_call
,
2755 _hostnamed_hostname1_skeleton_handle_get_property
,
2756 _hostnamed_hostname1_skeleton_handle_set_property
,
2760 static GDBusInterfaceInfo
*
2761 hostnamed_hostname1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton
*skeleton G_GNUC_UNUSED
)
2763 return hostnamed_hostname1_interface_info ();
2766 static GDBusInterfaceVTable
*
2767 hostnamed_hostname1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton
*skeleton G_GNUC_UNUSED
)
2769 return (GDBusInterfaceVTable
*) &_hostnamed_hostname1_skeleton_vtable
;
2773 hostnamed_hostname1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton
*_skeleton
)
2775 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (_skeleton
);
2777 GVariantBuilder builder
;
2779 g_variant_builder_init (&builder
, G_VARIANT_TYPE ("a{sv}"));
2780 if (_hostnamed_hostname1_interface_info
.parent_struct
.properties
== NULL
)
2782 for (n
= 0; _hostnamed_hostname1_interface_info
.parent_struct
.properties
[n
] != NULL
; n
++)
2784 GDBusPropertyInfo
*info
= _hostnamed_hostname1_interface_info
.parent_struct
.properties
[n
];
2785 if (info
->flags
& G_DBUS_PROPERTY_INFO_FLAGS_READABLE
)
2788 value
= _hostnamed_hostname1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton
)), NULL
, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton
)), "org.freedesktop.hostname1", info
->name
, NULL
, skeleton
);
2791 g_variant_take_ref (value
);
2792 g_variant_builder_add (&builder
, "{sv}", info
->name
, value
);
2793 g_variant_unref (value
);
2798 return g_variant_builder_end (&builder
);
2801 static gboolean
_hostnamed_hostname1_emit_changed (gpointer user_data
);
2804 hostnamed_hostname1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton
*_skeleton
)
2806 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (_skeleton
);
2807 gboolean emit_changed
= FALSE
;
2809 g_mutex_lock (&skeleton
->priv
->lock
);
2810 if (skeleton
->priv
->changed_properties_idle_source
!= NULL
)
2812 g_source_destroy (skeleton
->priv
->changed_properties_idle_source
);
2813 skeleton
->priv
->changed_properties_idle_source
= NULL
;
2814 emit_changed
= TRUE
;
2816 g_mutex_unlock (&skeleton
->priv
->lock
);
2819 _hostnamed_hostname1_emit_changed (skeleton
);
2822 static void hostnamed_hostname1_skeleton_iface_init (hostnamedHostname1Iface
*iface
);
2823 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
2824 G_DEFINE_TYPE_WITH_CODE (hostnamedHostname1Skeleton
, hostnamed_hostname1_skeleton
, G_TYPE_DBUS_INTERFACE_SKELETON
,
2825 G_ADD_PRIVATE (hostnamedHostname1Skeleton
)
2826 G_IMPLEMENT_INTERFACE (HOSTNAMED_TYPE_HOSTNAME1
, hostnamed_hostname1_skeleton_iface_init
));
2829 G_DEFINE_TYPE_WITH_CODE (hostnamedHostname1Skeleton
, hostnamed_hostname1_skeleton
, G_TYPE_DBUS_INTERFACE_SKELETON
,
2830 G_IMPLEMENT_INTERFACE (HOSTNAMED_TYPE_HOSTNAME1
, hostnamed_hostname1_skeleton_iface_init
));
2834 hostnamed_hostname1_skeleton_finalize (GObject
*object
)
2836 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
2838 for (n
= 0; n
< 10; n
++)
2839 g_value_unset (&skeleton
->priv
->properties
[n
]);
2840 g_free (skeleton
->priv
->properties
);
2841 g_list_free_full (skeleton
->priv
->changed_properties
, (GDestroyNotify
) _changed_property_free
);
2842 if (skeleton
->priv
->changed_properties_idle_source
!= NULL
)
2843 g_source_destroy (skeleton
->priv
->changed_properties_idle_source
);
2844 g_main_context_unref (skeleton
->priv
->context
);
2845 g_mutex_clear (&skeleton
->priv
->lock
);
2846 G_OBJECT_CLASS (hostnamed_hostname1_skeleton_parent_class
)->finalize (object
);
2850 hostnamed_hostname1_skeleton_get_property (GObject
*object
,
2853 GParamSpec
*pspec G_GNUC_UNUSED
)
2855 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
2856 g_assert (prop_id
!= 0 && prop_id
- 1 < 10);
2857 g_mutex_lock (&skeleton
->priv
->lock
);
2858 g_value_copy (&skeleton
->priv
->properties
[prop_id
- 1], value
);
2859 g_mutex_unlock (&skeleton
->priv
->lock
);
2863 _hostnamed_hostname1_emit_changed (gpointer user_data
)
2865 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (user_data
);
2867 GVariantBuilder builder
;
2868 GVariantBuilder invalidated_builder
;
2871 g_mutex_lock (&skeleton
->priv
->lock
);
2872 g_variant_builder_init (&builder
, G_VARIANT_TYPE ("a{sv}"));
2873 g_variant_builder_init (&invalidated_builder
, G_VARIANT_TYPE ("as"));
2874 for (l
= skeleton
->priv
->changed_properties
, num_changes
= 0; l
!= NULL
; l
= l
->next
)
2876 ChangedProperty
*cp
= l
->data
;
2878 const GValue
*cur_value
;
2880 cur_value
= &skeleton
->priv
->properties
[cp
->prop_id
- 1];
2881 if (!_g_value_equal (cur_value
, &cp
->orig_value
))
2883 variant
= g_dbus_gvalue_to_gvariant (cur_value
, G_VARIANT_TYPE (cp
->info
->parent_struct
.signature
));
2884 g_variant_builder_add (&builder
, "{sv}", cp
->info
->parent_struct
.name
, variant
);
2885 g_variant_unref (variant
);
2889 if (num_changes
> 0)
2891 GList
*connections
, *ll
;
2892 GVariant
*signal_variant
;
2893 signal_variant
= g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.hostname1",
2894 &builder
, &invalidated_builder
));
2895 connections
= g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton
));
2896 for (ll
= connections
; ll
!= NULL
; ll
= ll
->next
)
2898 GDBusConnection
*connection
= ll
->data
;
2900 g_dbus_connection_emit_signal (connection
,
2901 NULL
, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton
)),
2902 "org.freedesktop.DBus.Properties",
2903 "PropertiesChanged",
2907 g_variant_unref (signal_variant
);
2908 g_list_free_full (connections
, g_object_unref
);
2912 g_variant_builder_clear (&builder
);
2913 g_variant_builder_clear (&invalidated_builder
);
2915 g_list_free_full (skeleton
->priv
->changed_properties
, (GDestroyNotify
) _changed_property_free
);
2916 skeleton
->priv
->changed_properties
= NULL
;
2917 skeleton
->priv
->changed_properties_idle_source
= NULL
;
2918 g_mutex_unlock (&skeleton
->priv
->lock
);
2923 _hostnamed_hostname1_schedule_emit_changed (hostnamedHostname1Skeleton
*skeleton
, const _ExtendedGDBusPropertyInfo
*info
, guint prop_id
, const GValue
*orig_value
)
2925 ChangedProperty
*cp
;
2928 for (l
= skeleton
->priv
->changed_properties
; l
!= NULL
; l
= l
->next
)
2930 ChangedProperty
*i_cp
= l
->data
;
2931 if (i_cp
->info
== info
)
2939 cp
= g_new0 (ChangedProperty
, 1);
2940 cp
->prop_id
= prop_id
;
2942 skeleton
->priv
->changed_properties
= g_list_prepend (skeleton
->priv
->changed_properties
, cp
);
2943 g_value_init (&cp
->orig_value
, G_VALUE_TYPE (orig_value
));
2944 g_value_copy (orig_value
, &cp
->orig_value
);
2949 hostnamed_hostname1_skeleton_notify (GObject
*object
,
2950 GParamSpec
*pspec G_GNUC_UNUSED
)
2952 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
2953 g_mutex_lock (&skeleton
->priv
->lock
);
2954 if (skeleton
->priv
->changed_properties
!= NULL
&&
2955 skeleton
->priv
->changed_properties_idle_source
== NULL
)
2957 skeleton
->priv
->changed_properties_idle_source
= g_idle_source_new ();
2958 g_source_set_priority (skeleton
->priv
->changed_properties_idle_source
, G_PRIORITY_DEFAULT
);
2959 g_source_set_callback (skeleton
->priv
->changed_properties_idle_source
, _hostnamed_hostname1_emit_changed
, g_object_ref (skeleton
), (GDestroyNotify
) g_object_unref
);
2960 g_source_attach (skeleton
->priv
->changed_properties_idle_source
, skeleton
->priv
->context
);
2961 g_source_unref (skeleton
->priv
->changed_properties_idle_source
);
2963 g_mutex_unlock (&skeleton
->priv
->lock
);
2967 hostnamed_hostname1_skeleton_set_property (GObject
*object
,
2969 const GValue
*value
,
2972 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
2973 g_assert (prop_id
!= 0 && prop_id
- 1 < 10);
2974 g_mutex_lock (&skeleton
->priv
->lock
);
2975 g_object_freeze_notify (object
);
2976 if (!_g_value_equal (value
, &skeleton
->priv
->properties
[prop_id
- 1]))
2978 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton
)) != NULL
)
2979 _hostnamed_hostname1_schedule_emit_changed (skeleton
, _hostnamed_hostname1_property_info_pointers
[prop_id
- 1], prop_id
, &skeleton
->priv
->properties
[prop_id
- 1]);
2980 g_value_copy (value
, &skeleton
->priv
->properties
[prop_id
- 1]);
2981 g_object_notify_by_pspec (object
, pspec
);
2983 g_mutex_unlock (&skeleton
->priv
->lock
);
2984 g_object_thaw_notify (object
);
2988 hostnamed_hostname1_skeleton_init (hostnamedHostname1Skeleton
*skeleton
)
2990 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
2991 skeleton
->priv
= hostnamed_hostname1_skeleton_get_instance_private (skeleton
);
2993 skeleton
->priv
= G_TYPE_INSTANCE_GET_PRIVATE (skeleton
, HOSTNAMED_TYPE_HOSTNAME1_SKELETON
, hostnamedHostname1SkeletonPrivate
);
2996 g_mutex_init (&skeleton
->priv
->lock
);
2997 skeleton
->priv
->context
= g_main_context_ref_thread_default ();
2998 skeleton
->priv
->properties
= g_new0 (GValue
, 10);
2999 g_value_init (&skeleton
->priv
->properties
[0], G_TYPE_STRING
);
3000 g_value_init (&skeleton
->priv
->properties
[1], G_TYPE_STRING
);
3001 g_value_init (&skeleton
->priv
->properties
[2], G_TYPE_STRING
);
3002 g_value_init (&skeleton
->priv
->properties
[3], G_TYPE_STRING
);
3003 g_value_init (&skeleton
->priv
->properties
[4], G_TYPE_STRING
);
3004 g_value_init (&skeleton
->priv
->properties
[5], G_TYPE_STRING
);
3005 g_value_init (&skeleton
->priv
->properties
[6], G_TYPE_STRING
);
3006 g_value_init (&skeleton
->priv
->properties
[7], G_TYPE_STRING
);
3007 g_value_init (&skeleton
->priv
->properties
[8], G_TYPE_STRING
);
3008 g_value_init (&skeleton
->priv
->properties
[9], G_TYPE_STRING
);
3011 static const gchar
*
3012 hostnamed_hostname1_skeleton_get_hostname (hostnamedHostname1
*object
)
3014 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3016 g_mutex_lock (&skeleton
->priv
->lock
);
3017 value
= g_value_get_string (&(skeleton
->priv
->properties
[0]));
3018 g_mutex_unlock (&skeleton
->priv
->lock
);
3022 static const gchar
*
3023 hostnamed_hostname1_skeleton_get_static_hostname (hostnamedHostname1
*object
)
3025 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3027 g_mutex_lock (&skeleton
->priv
->lock
);
3028 value
= g_value_get_string (&(skeleton
->priv
->properties
[1]));
3029 g_mutex_unlock (&skeleton
->priv
->lock
);
3033 static const gchar
*
3034 hostnamed_hostname1_skeleton_get_pretty_hostname (hostnamedHostname1
*object
)
3036 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3038 g_mutex_lock (&skeleton
->priv
->lock
);
3039 value
= g_value_get_string (&(skeleton
->priv
->properties
[2]));
3040 g_mutex_unlock (&skeleton
->priv
->lock
);
3044 static const gchar
*
3045 hostnamed_hostname1_skeleton_get_icon_name (hostnamedHostname1
*object
)
3047 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3049 g_mutex_lock (&skeleton
->priv
->lock
);
3050 value
= g_value_get_string (&(skeleton
->priv
->properties
[3]));
3051 g_mutex_unlock (&skeleton
->priv
->lock
);
3055 static const gchar
*
3056 hostnamed_hostname1_skeleton_get_chassis (hostnamedHostname1
*object
)
3058 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3060 g_mutex_lock (&skeleton
->priv
->lock
);
3061 value
= g_value_get_string (&(skeleton
->priv
->properties
[4]));
3062 g_mutex_unlock (&skeleton
->priv
->lock
);
3066 static const gchar
*
3067 hostnamed_hostname1_skeleton_get_kernel_name (hostnamedHostname1
*object
)
3069 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3071 g_mutex_lock (&skeleton
->priv
->lock
);
3072 value
= g_value_get_string (&(skeleton
->priv
->properties
[5]));
3073 g_mutex_unlock (&skeleton
->priv
->lock
);
3077 static const gchar
*
3078 hostnamed_hostname1_skeleton_get_kernel_release (hostnamedHostname1
*object
)
3080 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3082 g_mutex_lock (&skeleton
->priv
->lock
);
3083 value
= g_value_get_string (&(skeleton
->priv
->properties
[6]));
3084 g_mutex_unlock (&skeleton
->priv
->lock
);
3088 static const gchar
*
3089 hostnamed_hostname1_skeleton_get_kernel_version (hostnamedHostname1
*object
)
3091 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3093 g_mutex_lock (&skeleton
->priv
->lock
);
3094 value
= g_value_get_string (&(skeleton
->priv
->properties
[7]));
3095 g_mutex_unlock (&skeleton
->priv
->lock
);
3099 static const gchar
*
3100 hostnamed_hostname1_skeleton_get_operating_system_pretty_name (hostnamedHostname1
*object
)
3102 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3104 g_mutex_lock (&skeleton
->priv
->lock
);
3105 value
= g_value_get_string (&(skeleton
->priv
->properties
[8]));
3106 g_mutex_unlock (&skeleton
->priv
->lock
);
3110 static const gchar
*
3111 hostnamed_hostname1_skeleton_get_operating_system_cpename (hostnamedHostname1
*object
)
3113 hostnamedHostname1Skeleton
*skeleton
= HOSTNAMED_HOSTNAME1_SKELETON (object
);
3115 g_mutex_lock (&skeleton
->priv
->lock
);
3116 value
= g_value_get_string (&(skeleton
->priv
->properties
[9]));
3117 g_mutex_unlock (&skeleton
->priv
->lock
);
3122 hostnamed_hostname1_skeleton_class_init (hostnamedHostname1SkeletonClass
*klass
)
3124 GObjectClass
*gobject_class
;
3125 GDBusInterfaceSkeletonClass
*skeleton_class
;
3127 gobject_class
= G_OBJECT_CLASS (klass
);
3128 gobject_class
->finalize
= hostnamed_hostname1_skeleton_finalize
;
3129 gobject_class
->get_property
= hostnamed_hostname1_skeleton_get_property
;
3130 gobject_class
->set_property
= hostnamed_hostname1_skeleton_set_property
;
3131 gobject_class
->notify
= hostnamed_hostname1_skeleton_notify
;
3134 hostnamed_hostname1_override_properties (gobject_class
, 1);
3136 skeleton_class
= G_DBUS_INTERFACE_SKELETON_CLASS (klass
);
3137 skeleton_class
->get_info
= hostnamed_hostname1_skeleton_dbus_interface_get_info
;
3138 skeleton_class
->get_properties
= hostnamed_hostname1_skeleton_dbus_interface_get_properties
;
3139 skeleton_class
->flush
= hostnamed_hostname1_skeleton_dbus_interface_flush
;
3140 skeleton_class
->get_vtable
= hostnamed_hostname1_skeleton_dbus_interface_get_vtable
;
3142 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
3143 g_type_class_add_private (klass
, sizeof (hostnamedHostname1SkeletonPrivate
));
3148 hostnamed_hostname1_skeleton_iface_init (hostnamedHostname1Iface
*iface
)
3150 iface
->get_hostname
= hostnamed_hostname1_skeleton_get_hostname
;
3151 iface
->get_static_hostname
= hostnamed_hostname1_skeleton_get_static_hostname
;
3152 iface
->get_pretty_hostname
= hostnamed_hostname1_skeleton_get_pretty_hostname
;
3153 iface
->get_icon_name
= hostnamed_hostname1_skeleton_get_icon_name
;
3154 iface
->get_chassis
= hostnamed_hostname1_skeleton_get_chassis
;
3155 iface
->get_kernel_name
= hostnamed_hostname1_skeleton_get_kernel_name
;
3156 iface
->get_kernel_release
= hostnamed_hostname1_skeleton_get_kernel_release
;
3157 iface
->get_kernel_version
= hostnamed_hostname1_skeleton_get_kernel_version
;
3158 iface
->get_operating_system_pretty_name
= hostnamed_hostname1_skeleton_get_operating_system_pretty_name
;
3159 iface
->get_operating_system_cpename
= hostnamed_hostname1_skeleton_get_operating_system_cpename
;
3163 * hostnamed_hostname1_skeleton_new:
3165 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-hostname1.top_of_page">org.freedesktop.hostname1</link>.
3167 * Returns: (transfer full) (type hostnamedHostname1Skeleton): The skeleton object.
3169 hostnamedHostname1
*
3170 hostnamed_hostname1_skeleton_new (void)
3172 return HOSTNAMED_HOSTNAME1 (g_object_new (HOSTNAMED_TYPE_HOSTNAME1_SKELETON
, NULL
));