diff --git a/libopenbmc_intf/openbmc_intf.c b/libopenbmc_intf/openbmc_intf.c
index 32efdd8..21ff545 100644
--- a/libopenbmc_intf/openbmc_intf.c
+++ b/libopenbmc_intf/openbmc_intf.c
@@ -1,7 +1,9 @@
 /*
- * Generated by gdbus-codegen 2.48.2. DO NOT EDIT.
+ * This file is generated by gdbus-codegen, do not modify it.
  *
- * The license of this code is the same as for the source it was derived from.
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from. Note that it links to GLib, so must comply with the
+ * LGPL linking clauses.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -15,6 +17,52 @@
 #  include <gio/gunixfdlist.h>
 #endif
 
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v)     g_value_get_schar (v)
+#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v)      g_value_get_int (v)
+#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
+#define g_marshal_value_peek_long(v)     g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
+#define g_marshal_value_peek_float(v)    g_value_get_float (v)
+#define g_marshal_value_peek_double(v)   g_value_get_double (v)
+#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v)    g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v)   g_value_get_object (v)
+#define g_marshal_value_peek_variant(v)  g_value_get_variant (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ *          Do not access GValues directly in your code. Instead, use the
+ *          g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
+#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
+#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
+#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
+#define g_marshal_value_peek_variant(v)  (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
 typedef struct
 {
   GDBusArgInfo parent_struct;
@@ -38,7 +86,8 @@
 {
   GDBusPropertyInfo parent_struct;
   const gchar *hyphen_name;
-  gboolean use_gvariant;
+  guint use_gvariant : 1;
+  guint emits_changed_signal : 1;
 } _ExtendedGDBusPropertyInfo;
 
 typedef struct
@@ -148,6 +197,488 @@
   return ret;
 }
 
+static void
+_g_dbus_codegen_marshal_BOOLEAN__OBJECT_INT (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectIntFunc)
+       (void *data1,
+        GDBusMethodInvocation *arg_method_invocation,
+        gint arg_cooling_zone,
+        void *data2);
+  _GDbusCodegenMarshalBoolean_ObjectIntFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalBoolean_ObjectIntFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  v_return =
+    callback (data1,
+              g_marshal_value_peek_object (param_values + 1),
+              g_marshal_value_peek_int (param_values + 2),
+              data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
+static void
+_g_dbus_codegen_marshal_BOOLEAN__OBJECT (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectFunc)
+       (void *data1,
+        GDBusMethodInvocation *arg_method_invocation,
+        void *data2);
+  _GDbusCodegenMarshalBoolean_ObjectFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 2);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalBoolean_ObjectFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  v_return =
+    callback (data1,
+              g_marshal_value_peek_object (param_values + 1),
+              data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
+static void
+_g_dbus_codegen_marshal_VOID__VARIANT_STRING (
+    GClosure     *closure,
+    GValue       *return_value G_GNUC_UNUSED,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef void (*_GDbusCodegenMarshalVoid_VariantStringFunc)
+       (void *data1,
+        GVariant *arg_value,
+        const gchar *arg_units,
+        void *data2);
+  _GDbusCodegenMarshalVoid_VariantStringFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalVoid_VariantStringFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_variant (param_values + 1),
+            g_marshal_value_peek_string (param_values + 2),
+            data2);
+}
+
+static void
+_g_dbus_codegen_marshal_BOOLEAN__OBJECT_VARIANT (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectVariantFunc)
+       (void *data1,
+        GDBusMethodInvocation *arg_method_invocation,
+        GVariant *arg_value,
+        void *data2);
+  _GDbusCodegenMarshalBoolean_ObjectVariantFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalBoolean_ObjectVariantFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  v_return =
+    callback (data1,
+              g_marshal_value_peek_object (param_values + 1),
+              g_marshal_value_peek_variant (param_values + 2),
+              data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
+static void
+_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringFunc)
+       (void *data1,
+        GDBusMethodInvocation *arg_method_invocation,
+        const gchar *arg_name,
+        void *data2);
+  _GDbusCodegenMarshalBoolean_ObjectStringFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalBoolean_ObjectStringFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  v_return =
+    callback (data1,
+              g_marshal_value_peek_object (param_values + 1),
+              g_marshal_value_peek_string (param_values + 2),
+              data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
+static void
+_g_dbus_codegen_marshal_VOID__INT_STRING_INT (
+    GClosure     *closure,
+    GValue       *return_value G_GNUC_UNUSED,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef void (*_GDbusCodegenMarshalVoid_IntStringIntFunc)
+       (void *data1,
+        gint arg_priority,
+        const gchar *arg_message,
+        gint arg_rc,
+        void *data2);
+  _GDbusCodegenMarshalVoid_IntStringIntFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+
+  g_return_if_fail (n_param_values == 4);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalVoid_IntStringIntFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_int (param_values + 1),
+            g_marshal_value_peek_string (param_values + 2),
+            g_marshal_value_peek_int (param_values + 3),
+            data2);
+}
+
+static void
+_g_dbus_codegen_marshal_VOID__STRING_STRING (
+    GClosure     *closure,
+    GValue       *return_value G_GNUC_UNUSED,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef void (*_GDbusCodegenMarshalVoid_StringStringFunc)
+       (void *data1,
+        const gchar *arg_url,
+        const gchar *arg_filename,
+        void *data2);
+  _GDbusCodegenMarshalVoid_StringStringFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalVoid_StringStringFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_string (param_values + 1),
+            g_marshal_value_peek_string (param_values + 2),
+            data2);
+}
+
+static void
+_g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectStringStringFunc)
+       (void *data1,
+        GDBusMethodInvocation *arg_method_invocation,
+        const gchar *arg_url,
+        const gchar *arg_filename,
+        void *data2);
+  _GDbusCodegenMarshalBoolean_ObjectStringStringFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 4);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalBoolean_ObjectStringStringFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  v_return =
+    callback (data1,
+              g_marshal_value_peek_object (param_values + 1),
+              g_marshal_value_peek_string (param_values + 2),
+              g_marshal_value_peek_string (param_values + 3),
+              data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
+static void
+_g_dbus_codegen_marshal_VOID__STRING_UCHAR (
+    GClosure     *closure,
+    GValue       *return_value G_GNUC_UNUSED,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef void (*_GDbusCodegenMarshalVoid_StringUcharFunc)
+       (void *data1,
+        const gchar *arg_filename,
+        guchar arg_progress,
+        void *data2);
+  _GDbusCodegenMarshalVoid_StringUcharFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalVoid_StringUcharFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_string (param_values + 1),
+            g_marshal_value_peek_uchar (param_values + 2),
+            data2);
+}
+
+static void
+_g_dbus_codegen_marshal_VOID__UCHAR_UCHAR_UCHAR_STRING (
+    GClosure     *closure,
+    GValue       *return_value G_GNUC_UNUSED,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef void (*_GDbusCodegenMarshalVoid_UcharUcharUcharStringFunc)
+       (void *data1,
+        guchar arg_seq,
+        guchar arg_netfn,
+        guchar arg_cmd,
+        const gchar *arg_data,
+        void *data2);
+  _GDbusCodegenMarshalVoid_UcharUcharUcharStringFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+
+  g_return_if_fail (n_param_values == 5);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalVoid_UcharUcharUcharStringFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_uchar (param_values + 1),
+            g_marshal_value_peek_uchar (param_values + 2),
+            g_marshal_value_peek_uchar (param_values + 3),
+            g_marshal_value_peek_string (param_values + 4),
+            data2);
+}
+
+static void
+_g_dbus_codegen_marshal_BOOLEAN__OBJECT_UCHAR_UCHAR_UCHAR_STRING (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint G_GNUC_UNUSED,
+    void         *marshal_data)
+{
+  typedef gboolean (*_GDbusCodegenMarshalBoolean_ObjectUcharUcharUcharStringFunc)
+       (void *data1,
+        GDBusMethodInvocation *arg_method_invocation,
+        guchar arg_seq,
+        guchar arg_netfn,
+        guchar arg_cmd,
+        const gchar *arg_data,
+        void *data2);
+  _GDbusCodegenMarshalBoolean_ObjectUcharUcharUcharStringFunc callback;
+  GCClosure *cc = (GCClosure*) closure;
+  void *data1, *data2;
+  gboolean v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 6);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+
+  callback = (_GDbusCodegenMarshalBoolean_ObjectUcharUcharUcharStringFunc)
+    (marshal_data ? marshal_data : cc->callback);
+
+  v_return =
+    callback (data1,
+              g_marshal_value_peek_object (param_values + 1),
+              g_marshal_value_peek_uchar (param_values + 2),
+              g_marshal_value_peek_uchar (param_values + 3),
+              g_marshal_value_peek_uchar (param_values + 4),
+              g_marshal_value_peek_string (param_values + 5),
+              data2);
+
+  g_value_set_boolean (return_value, v_return);
+}
+
 /* ------------------------------------------------------------------------
  * Code for interface org.openbmc.Hwmon
  * ------------------------------------------------------------------------
@@ -173,7 +704,8 @@
     NULL
   },
   "poll-interval",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _hwmon_property_info_sysfs_path =
@@ -186,7 +718,8 @@
     NULL
   },
   "sysfs-path",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _hwmon_property_info_scale =
@@ -199,14 +732,15 @@
     NULL
   },
   "scale",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _hwmon_property_info_pointers[] =
+static const GDBusPropertyInfo * const _hwmon_property_info_pointers[] =
 {
-  &_hwmon_property_info_poll_interval,
-  &_hwmon_property_info_sysfs_path,
-  &_hwmon_property_info_scale,
+  &_hwmon_property_info_poll_interval.parent_struct,
+  &_hwmon_property_info_sysfs_path.parent_struct,
+  &_hwmon_property_info_scale.parent_struct,
   NULL
 };
 
@@ -239,7 +773,7 @@
 
 /**
  * hwmon_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Hwmon interface for a concrete class.
@@ -275,7 +809,7 @@
  */
 
 typedef HwmonIface HwmonInterface;
-G_DEFINE_INTERFACE (Hwmon, hwmon, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Hwmon, hwmon, G_TYPE_OBJECT)
 
 static void
 hwmon_default_init (HwmonIface *iface)
@@ -323,6 +857,8 @@
 gint 
 hwmon_get_poll_interval (Hwmon *object)
 {
+  g_return_val_if_fail (IS_HWMON (object), 0);
+
   return HWMON_GET_IFACE (object)->get_poll_interval (object);
 }
 
@@ -349,13 +885,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 hwmon_dup_sysfs_path() if on another thread.</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 hwmon_dup_sysfs_path() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 hwmon_get_sysfs_path (Hwmon *object)
 {
+  g_return_val_if_fail (IS_HWMON (object), NULL);
+
   return HWMON_GET_IFACE (object)->get_sysfs_path (object);
 }
 
@@ -367,7 +905,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 hwmon_dup_sysfs_path (Hwmon *object)
@@ -405,6 +943,8 @@
 gint 
 hwmon_get_scale (Hwmon *object)
 {
+  g_return_val_if_fail (IS_HWMON (object), 0);
+
   return HWMON_GET_IFACE (object)->get_scale (object);
 }
 
@@ -448,11 +988,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (HwmonProxy, hwmon_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (HwmonProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (HwmonProxy, hwmon_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_proxy_iface_init))
 
 #endif
 static void
@@ -472,7 +1012,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _hwmon_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _hwmon_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -519,7 +1059,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _hwmon_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _hwmon_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -540,8 +1080,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_hwmon_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -691,15 +1231,15 @@
  * hwmon_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Hwmon.top_of_page">org.openbmc.Hwmon</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call hwmon_proxy_new_finish() to get the result of the operation.
  *
  * See hwmon_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -746,9 +1286,9 @@
  * hwmon_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Hwmon.top_of_page">org.openbmc.Hwmon</link>. See g_dbus_proxy_new_sync() for more details.
@@ -783,13 +1323,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like hwmon_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call hwmon_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See hwmon_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -838,7 +1378,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like hwmon_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -907,9 +1447,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -1099,11 +1639,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (HwmonSkeleton, hwmon_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (HwmonSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (HwmonSkeleton, hwmon_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HWMON, hwmon_skeleton_iface_init))
 
 #endif
 static void
@@ -1246,14 +1786,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   HwmonSkeleton *skeleton = HWMON_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 3);
+  info = (const _ExtendedGDBusPropertyInfo *) _hwmon_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _hwmon_schedule_emit_changed (skeleton, _hwmon_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _hwmon_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -1284,7 +1827,7 @@
   HwmonSkeleton *skeleton = HWMON_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -1295,7 +1838,7 @@
   HwmonSkeleton *skeleton = HWMON_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -1306,7 +1849,7 @@
   HwmonSkeleton *skeleton = HWMON_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -1371,6 +1914,14 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-Fan.top_of_page">org.openbmc.Fan</link> D-Bus interface in C.
  */
 
+enum
+{
+  _FAN_SPEED_CHANGED,
+  _FAN_TACH_ERROR,
+};
+
+static unsigned _FAN_SIGNALS[2] = { 0 };
+
 /* ---- Introspection data for org.openbmc.Fan ---- */
 
 static const _ExtendedGDBusArgInfo _fan_method_info_set_cooling_zone_IN_ARG_cooling_zone =
@@ -1384,9 +1935,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _fan_method_info_set_cooling_zone_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _fan_method_info_set_cooling_zone_IN_ARG_pointers[] =
 {
-  &_fan_method_info_set_cooling_zone_IN_ARG_cooling_zone,
+  &_fan_method_info_set_cooling_zone_IN_ARG_cooling_zone.parent_struct,
   NULL
 };
 
@@ -1414,9 +1965,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _fan_method_info_get_speed_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _fan_method_info_get_speed_OUT_ARG_pointers[] =
 {
-  &_fan_method_info_get_speed_OUT_ARG_speed,
+  &_fan_method_info_get_speed_OUT_ARG_speed.parent_struct,
   NULL
 };
 
@@ -1444,9 +1995,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _fan_method_info_set_speed_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _fan_method_info_set_speed_IN_ARG_pointers[] =
 {
-  &_fan_method_info_set_speed_IN_ARG_speed,
+  &_fan_method_info_set_speed_IN_ARG_speed.parent_struct,
   NULL
 };
 
@@ -1463,11 +2014,11 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _fan_method_info_pointers[] =
+static const GDBusMethodInfo * const _fan_method_info_pointers[] =
 {
-  &_fan_method_info_set_cooling_zone,
-  &_fan_method_info_get_speed,
-  &_fan_method_info_set_speed,
+  &_fan_method_info_set_cooling_zone.parent_struct,
+  &_fan_method_info_get_speed.parent_struct,
+  &_fan_method_info_set_speed.parent_struct,
   NULL
 };
 
@@ -1482,9 +2033,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _fan_signal_info_speed_changed_ARG_pointers[] =
+static const GDBusArgInfo * const _fan_signal_info_speed_changed_ARG_pointers[] =
 {
-  &_fan_signal_info_speed_changed_ARG_speed,
+  &_fan_signal_info_speed_changed_ARG_speed.parent_struct,
   NULL
 };
 
@@ -1510,10 +2061,10 @@
   "tach-error"
 };
 
-static const _ExtendedGDBusSignalInfo * const _fan_signal_info_pointers[] =
+static const GDBusSignalInfo * const _fan_signal_info_pointers[] =
 {
-  &_fan_signal_info_speed_changed,
-  &_fan_signal_info_tach_error,
+  &_fan_signal_info_speed_changed.parent_struct,
+  &_fan_signal_info_tach_error.parent_struct,
   NULL
 };
 
@@ -1527,7 +2078,8 @@
     NULL
   },
   "speed",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _fan_property_info_cooling_zone =
@@ -1540,7 +2092,8 @@
     NULL
   },
   "cooling-zone",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _fan_property_info_pwm_num =
@@ -1553,14 +2106,15 @@
     NULL
   },
   "pwm-num",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _fan_property_info_pointers[] =
+static const GDBusPropertyInfo * const _fan_property_info_pointers[] =
 {
-  &_fan_property_info_speed,
-  &_fan_property_info_cooling_zone,
-  &_fan_property_info_pwm_num,
+  &_fan_property_info_speed.parent_struct,
+  &_fan_property_info_cooling_zone.parent_struct,
+  &_fan_property_info_pwm_num.parent_struct,
   NULL
 };
 
@@ -1593,7 +2147,7 @@
 
 /**
  * fan_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Fan interface for a concrete class.
@@ -1611,6 +2165,71 @@
 }
 
 
+inline static void
+fan_signal_marshal_speed_changed (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__INT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+fan_signal_marshal_tach_error (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+fan_method_marshal_set_cooling_zone (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_INT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+fan_method_marshal_get_speed (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+fan_method_marshal_set_speed (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_INT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Fan:
@@ -1634,7 +2253,7 @@
  */
 
 typedef FanIface FanInterface;
-G_DEFINE_INTERFACE (Fan, fan, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Fan, fan, G_TYPE_OBJECT)
 
 static void
 fan_default_init (FanIface *iface)
@@ -1648,9 +2267,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Fan.setCoolingZone">setCoolingZone()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call fan_complete_set_cooling_zone() 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.
+   * 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 fan_complete_set_cooling_zone() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-cooling-zone",
     G_TYPE_FROM_INTERFACE (iface),
@@ -1658,7 +2277,7 @@
     G_STRUCT_OFFSET (FanIface, handle_set_cooling_zone),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      fan_method_marshal_set_cooling_zone,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
@@ -1670,9 +2289,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Fan.getSpeed">getSpeed()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call fan_complete_get_speed() 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.
+   * 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 fan_complete_get_speed() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-get-speed",
     G_TYPE_FROM_INTERFACE (iface),
@@ -1680,7 +2299,7 @@
     G_STRUCT_OFFSET (FanIface, handle_get_speed),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      fan_method_marshal_get_speed,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -1693,9 +2312,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Fan.setSpeed">setSpeed()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call fan_complete_set_speed() 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.
+   * 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 fan_complete_set_speed() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-speed",
     G_TYPE_FROM_INTERFACE (iface),
@@ -1703,7 +2322,7 @@
     G_STRUCT_OFFSET (FanIface, handle_set_speed),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      fan_method_marshal_set_speed,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
@@ -1718,15 +2337,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("speed-changed",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FanIface, speed_changed),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    1, G_TYPE_INT);
+  _FAN_SIGNALS[_FAN_SPEED_CHANGED] =
+    g_signal_new ("speed-changed",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FanIface, speed_changed),
+      NULL,
+      NULL,
+      fan_signal_marshal_speed_changed,
+      G_TYPE_NONE,
+      1, G_TYPE_INT);
 
   /**
    * Fan::tach-error:
@@ -1736,15 +2356,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("tach-error",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FanIface, tach_error),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _FAN_SIGNALS[_FAN_TACH_ERROR] =
+    g_signal_new ("tach-error",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FanIface, tach_error),
+      NULL,
+      NULL,
+      fan_signal_marshal_tach_error,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -1789,6 +2410,8 @@
 gint 
 fan_get_speed (Fan *object)
 {
+  g_return_val_if_fail (IS_FAN (object), 0);
+
   return FAN_GET_IFACE (object)->get_speed (object);
 }
 
@@ -1820,6 +2443,8 @@
 gint 
 fan_get_cooling_zone (Fan *object)
 {
+  g_return_val_if_fail (IS_FAN (object), 0);
+
   return FAN_GET_IFACE (object)->get_cooling_zone (object);
 }
 
@@ -1851,6 +2476,8 @@
 gint 
 fan_get_pwm_num (Fan *object)
 {
+  g_return_val_if_fail (IS_FAN (object), 0);
+
   return FAN_GET_IFACE (object)->get_pwm_num (object);
 }
 
@@ -1881,7 +2508,7 @@
     Fan *object,
     gint arg_speed)
 {
-  g_signal_emit_by_name (object, "speed-changed", arg_speed);
+  g_signal_emit (object, _FAN_SIGNALS[_FAN_SPEED_CHANGED], 0, arg_speed);
 }
 
 /**
@@ -1894,19 +2521,19 @@
 fan_emit_tach_error (
     Fan *object)
 {
-  g_signal_emit_by_name (object, "tach-error");
+  g_signal_emit (object, _FAN_SIGNALS[_FAN_TACH_ERROR], 0);
 }
 
 /**
  * fan_call_set_cooling_zone:
  * @proxy: A #FanProxy.
  * @arg_cooling_zone: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Fan.setCoolingZone">setCoolingZone()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call fan_call_set_cooling_zone_finish() to get the result of the operation.
  *
  * See fan_call_set_cooling_zone_sync() for the synchronous, blocking version of this method.
@@ -1961,7 +2588,7 @@
  * fan_call_set_cooling_zone_sync:
  * @proxy: A #FanProxy.
  * @arg_cooling_zone: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Fan.setCoolingZone">setCoolingZone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -1998,12 +2625,12 @@
 /**
  * fan_call_get_speed:
  * @proxy: A #FanProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Fan.getSpeed">getSpeed()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call fan_call_get_speed_finish() to get the result of the operation.
  *
  * See fan_call_get_speed_sync() for the synchronous, blocking version of this method.
@@ -2028,7 +2655,7 @@
 /**
  * fan_call_get_speed_finish:
  * @proxy: A #FanProxy.
- * @out_speed: (out): Return location for return parameter or %NULL to ignore.
+ * @out_speed: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to fan_call_get_speed().
  * @error: Return location for error or %NULL.
  *
@@ -2058,8 +2685,8 @@
 /**
  * fan_call_get_speed_sync:
  * @proxy: A #FanProxy.
- * @out_speed: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_speed: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Fan.getSpeed">getSpeed()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -2097,12 +2724,12 @@
  * fan_call_set_speed:
  * @proxy: A #FanProxy.
  * @arg_speed: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Fan.setSpeed">setSpeed()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call fan_call_set_speed_finish() to get the result of the operation.
  *
  * See fan_call_set_speed_sync() for the synchronous, blocking version of this method.
@@ -2157,7 +2784,7 @@
  * fan_call_set_speed_sync:
  * @proxy: A #FanProxy.
  * @arg_speed: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Fan.setSpeed">setSpeed()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -2202,7 +2829,7 @@
  */
 void
 fan_complete_set_cooling_zone (
-    Fan *object,
+    Fan *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -2221,7 +2848,7 @@
  */
 void
 fan_complete_get_speed (
-    Fan *object,
+    Fan *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     gint speed)
 {
@@ -2241,7 +2868,7 @@
  */
 void
 fan_complete_set_speed (
-    Fan *object,
+    Fan *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -2273,11 +2900,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (FanProxy, fan_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (FanProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (FanProxy, fan_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_proxy_iface_init))
 
 #endif
 static void
@@ -2297,7 +2924,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _fan_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _fan_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -2344,7 +2971,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _fan_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _fan_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -2365,8 +2992,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_fan_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -2516,15 +3143,15 @@
  * fan_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Fan.top_of_page">org.openbmc.Fan</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call fan_proxy_new_finish() to get the result of the operation.
  *
  * See fan_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -2571,9 +3198,9 @@
  * fan_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Fan.top_of_page">org.openbmc.Fan</link>. See g_dbus_proxy_new_sync() for more details.
@@ -2608,13 +3235,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like fan_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call fan_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See fan_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -2663,7 +3290,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like fan_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -2732,9 +3359,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -2970,11 +3597,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (FanSkeleton, fan_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (FanSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (FanSkeleton, fan_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FAN, fan_skeleton_iface_init))
 
 #endif
 static void
@@ -3117,14 +3744,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   FanSkeleton *skeleton = FAN_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 3);
+  info = (const _ExtendedGDBusPropertyInfo *) _fan_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _fan_schedule_emit_changed (skeleton, _fan_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _fan_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -3155,7 +3785,7 @@
   FanSkeleton *skeleton = FAN_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -3166,7 +3796,7 @@
   FanSkeleton *skeleton = FAN_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -3177,7 +3807,7 @@
   FanSkeleton *skeleton = FAN_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -3244,6 +3874,15 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-SensorValue.top_of_page">org.openbmc.SensorValue</link> D-Bus interface in C.
  */
 
+enum
+{
+  _SENSOR_VALUE_CHANGED,
+  _SENSOR_VALUE_ERROR,
+  _SENSOR_VALUE_HEARTBEAT,
+};
+
+static unsigned _SENSOR_VALUE_SIGNALS[3] = { 0 };
+
 /* ---- Introspection data for org.openbmc.SensorValue ---- */
 
 static const _ExtendedGDBusMethodInfo _sensor_value_method_info_init =
@@ -3270,9 +3909,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _sensor_value_method_info_get_value_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _sensor_value_method_info_get_value_OUT_ARG_pointers[] =
 {
-  &_sensor_value_method_info_get_value_OUT_ARG_value,
+  &_sensor_value_method_info_get_value_OUT_ARG_value.parent_struct,
   NULL
 };
 
@@ -3300,9 +3939,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _sensor_value_method_info_set_value_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _sensor_value_method_info_set_value_IN_ARG_pointers[] =
 {
-  &_sensor_value_method_info_set_value_IN_ARG_value,
+  &_sensor_value_method_info_set_value_IN_ARG_value.parent_struct,
   NULL
 };
 
@@ -3319,11 +3958,11 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _sensor_value_method_info_pointers[] =
+static const GDBusMethodInfo * const _sensor_value_method_info_pointers[] =
 {
-  &_sensor_value_method_info_init,
-  &_sensor_value_method_info_get_value,
-  &_sensor_value_method_info_set_value,
+  &_sensor_value_method_info_init.parent_struct,
+  &_sensor_value_method_info_get_value.parent_struct,
+  &_sensor_value_method_info_set_value.parent_struct,
   NULL
 };
 
@@ -3349,10 +3988,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _sensor_value_signal_info_changed_ARG_pointers[] =
+static const GDBusArgInfo * const _sensor_value_signal_info_changed_ARG_pointers[] =
 {
-  &_sensor_value_signal_info_changed_ARG_value,
-  &_sensor_value_signal_info_changed_ARG_units,
+  &_sensor_value_signal_info_changed_ARG_value.parent_struct,
+  &_sensor_value_signal_info_changed_ARG_units.parent_struct,
   NULL
 };
 
@@ -3389,9 +4028,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _sensor_value_signal_info_heartbeat_ARG_pointers[] =
+static const GDBusArgInfo * const _sensor_value_signal_info_heartbeat_ARG_pointers[] =
 {
-  &_sensor_value_signal_info_heartbeat_ARG_bus_name,
+  &_sensor_value_signal_info_heartbeat_ARG_bus_name.parent_struct,
   NULL
 };
 
@@ -3406,11 +4045,11 @@
   "heartbeat"
 };
 
-static const _ExtendedGDBusSignalInfo * const _sensor_value_signal_info_pointers[] =
+static const GDBusSignalInfo * const _sensor_value_signal_info_pointers[] =
 {
-  &_sensor_value_signal_info_changed,
-  &_sensor_value_signal_info_error,
-  &_sensor_value_signal_info_heartbeat,
+  &_sensor_value_signal_info_changed.parent_struct,
+  &_sensor_value_signal_info_error.parent_struct,
+  &_sensor_value_signal_info_heartbeat.parent_struct,
   NULL
 };
 
@@ -3424,7 +4063,8 @@
     NULL
   },
   "value",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_value_property_info_units =
@@ -3437,7 +4077,8 @@
     NULL
   },
   "units",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_value_property_info_poll_interval =
@@ -3450,7 +4091,8 @@
     NULL
   },
   "poll-interval",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_value_property_info_heatbeat =
@@ -3463,7 +4105,8 @@
     NULL
   },
   "heatbeat",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_value_property_info_settable =
@@ -3476,16 +4119,17 @@
     NULL
   },
   "settable",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _sensor_value_property_info_pointers[] =
+static const GDBusPropertyInfo * const _sensor_value_property_info_pointers[] =
 {
-  &_sensor_value_property_info_value,
-  &_sensor_value_property_info_units,
-  &_sensor_value_property_info_poll_interval,
-  &_sensor_value_property_info_heatbeat,
-  &_sensor_value_property_info_settable,
+  &_sensor_value_property_info_value.parent_struct,
+  &_sensor_value_property_info_units.parent_struct,
+  &_sensor_value_property_info_poll_interval.parent_struct,
+  &_sensor_value_property_info_heatbeat.parent_struct,
+  &_sensor_value_property_info_settable.parent_struct,
   NULL
 };
 
@@ -3518,7 +4162,7 @@
 
 /**
  * sensor_value_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #SensorValue interface for a concrete class.
@@ -3538,6 +4182,84 @@
 }
 
 
+inline static void
+sensor_value_signal_marshal_changed (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_VOID__VARIANT_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_value_signal_marshal_error (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_value_signal_marshal_heartbeat (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_value_method_marshal_init (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_value_method_marshal_get_value (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_value_method_marshal_set_value (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_VARIANT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * SensorValue:
@@ -3564,7 +4286,7 @@
  */
 
 typedef SensorValueIface SensorValueInterface;
-G_DEFINE_INTERFACE (SensorValue, sensor_value, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (SensorValue, sensor_value, G_TYPE_OBJECT)
 
 static void
 sensor_value_default_init (SensorValueIface *iface)
@@ -3577,9 +4299,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SensorValue.init">init()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call sensor_value_complete_init() 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.
+   * 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 sensor_value_complete_init() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-init",
     G_TYPE_FROM_INTERFACE (iface),
@@ -3587,7 +4309,7 @@
     G_STRUCT_OFFSET (SensorValueIface, handle_init),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      sensor_value_method_marshal_init,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -3599,9 +4321,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SensorValue.getValue">getValue()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call sensor_value_complete_get_value() 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.
+   * 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 sensor_value_complete_get_value() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-get-value",
     G_TYPE_FROM_INTERFACE (iface),
@@ -3609,7 +4331,7 @@
     G_STRUCT_OFFSET (SensorValueIface, handle_get_value),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      sensor_value_method_marshal_get_value,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -3622,9 +4344,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SensorValue.setValue">setValue()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call sensor_value_complete_set_value() 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.
+   * 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 sensor_value_complete_set_value() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-value",
     G_TYPE_FROM_INTERFACE (iface),
@@ -3632,7 +4354,7 @@
     G_STRUCT_OFFSET (SensorValueIface, handle_set_value),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      sensor_value_method_marshal_set_value,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
@@ -3648,15 +4370,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("changed",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorValueIface, changed),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    2, G_TYPE_VARIANT, G_TYPE_STRING);
+  _SENSOR_VALUE_SIGNALS[_SENSOR_VALUE_CHANGED] =
+    g_signal_new ("changed",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorValueIface, changed),
+      NULL,
+      NULL,
+      sensor_value_signal_marshal_changed,
+      G_TYPE_NONE,
+      2, G_TYPE_VARIANT, G_TYPE_STRING);
 
   /**
    * SensorValue::error:
@@ -3666,15 +4389,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("error",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorValueIface, error),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _SENSOR_VALUE_SIGNALS[_SENSOR_VALUE_ERROR] =
+    g_signal_new ("error",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorValueIface, error),
+      NULL,
+      NULL,
+      sensor_value_signal_marshal_error,
+      G_TYPE_NONE,
+      0);
 
   /**
    * SensorValue::heartbeat:
@@ -3685,15 +4409,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("heartbeat",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorValueIface, heartbeat),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    1, G_TYPE_STRING);
+  _SENSOR_VALUE_SIGNALS[_SENSOR_VALUE_HEARTBEAT] =
+    g_signal_new ("heartbeat",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorValueIface, heartbeat),
+      NULL,
+      NULL,
+      sensor_value_signal_marshal_heartbeat,
+      G_TYPE_NONE,
+      1, G_TYPE_STRING);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -3751,13 +4476,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_value_dup_value() if on another thread.</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 sensor_value_dup_value() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 GVariant *
 sensor_value_get_value (SensorValue *object)
 {
+  g_return_val_if_fail (IS_SENSOR_VALUE (object), NULL);
+
   return SENSOR_VALUE_GET_IFACE (object)->get_value (object);
 }
 
@@ -3769,7 +4496,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
  */
 GVariant *
 sensor_value_dup_value (SensorValue *object)
@@ -3802,13 +4529,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_value_dup_units() if on another thread.</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 sensor_value_dup_units() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 sensor_value_get_units (SensorValue *object)
 {
+  g_return_val_if_fail (IS_SENSOR_VALUE (object), NULL);
+
   return SENSOR_VALUE_GET_IFACE (object)->get_units (object);
 }
 
@@ -3820,7 +4549,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 sensor_value_dup_units (SensorValue *object)
@@ -3858,6 +4587,8 @@
 gint 
 sensor_value_get_poll_interval (SensorValue *object)
 {
+  g_return_val_if_fail (IS_SENSOR_VALUE (object), 0);
+
   return SENSOR_VALUE_GET_IFACE (object)->get_poll_interval (object);
 }
 
@@ -3889,6 +4620,8 @@
 gint 
 sensor_value_get_heatbeat (SensorValue *object)
 {
+  g_return_val_if_fail (IS_SENSOR_VALUE (object), 0);
+
   return SENSOR_VALUE_GET_IFACE (object)->get_heatbeat (object);
 }
 
@@ -3920,6 +4653,8 @@
 gboolean 
 sensor_value_get_settable (SensorValue *object)
 {
+  g_return_val_if_fail (IS_SENSOR_VALUE (object), FALSE);
+
   return SENSOR_VALUE_GET_IFACE (object)->get_settable (object);
 }
 
@@ -3952,7 +4687,7 @@
     GVariant *arg_value,
     const gchar *arg_units)
 {
-  g_signal_emit_by_name (object, "changed", arg_value, arg_units);
+  g_signal_emit (object, _SENSOR_VALUE_SIGNALS[_SENSOR_VALUE_CHANGED], 0, arg_value, arg_units);
 }
 
 /**
@@ -3965,7 +4700,7 @@
 sensor_value_emit_error (
     SensorValue *object)
 {
-  g_signal_emit_by_name (object, "error");
+  g_signal_emit (object, _SENSOR_VALUE_SIGNALS[_SENSOR_VALUE_ERROR], 0);
 }
 
 /**
@@ -3980,18 +4715,18 @@
     SensorValue *object,
     const gchar *arg_bus_name)
 {
-  g_signal_emit_by_name (object, "heartbeat", arg_bus_name);
+  g_signal_emit (object, _SENSOR_VALUE_SIGNALS[_SENSOR_VALUE_HEARTBEAT], 0, arg_bus_name);
 }
 
 /**
  * sensor_value_call_init:
  * @proxy: A #SensorValueProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorValue.init">init()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_value_call_init_finish() to get the result of the operation.
  *
  * See sensor_value_call_init_sync() for the synchronous, blocking version of this method.
@@ -4043,7 +4778,7 @@
 /**
  * sensor_value_call_init_sync:
  * @proxy: A #SensorValueProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorValue.init">init()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -4078,12 +4813,12 @@
 /**
  * sensor_value_call_get_value:
  * @proxy: A #SensorValueProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorValue.getValue">getValue()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_value_call_get_value_finish() to get the result of the operation.
  *
  * See sensor_value_call_get_value_sync() for the synchronous, blocking version of this method.
@@ -4108,7 +4843,7 @@
 /**
  * sensor_value_call_get_value_finish:
  * @proxy: A #SensorValueProxy.
- * @out_value: (out): Return location for return parameter or %NULL to ignore.
+ * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to sensor_value_call_get_value().
  * @error: Return location for error or %NULL.
  *
@@ -4138,8 +4873,8 @@
 /**
  * sensor_value_call_get_value_sync:
  * @proxy: A #SensorValueProxy.
- * @out_value: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorValue.getValue">getValue()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -4177,12 +4912,12 @@
  * sensor_value_call_set_value:
  * @proxy: A #SensorValueProxy.
  * @arg_value: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorValue.setValue">setValue()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_value_call_set_value_finish() to get the result of the operation.
  *
  * See sensor_value_call_set_value_sync() for the synchronous, blocking version of this method.
@@ -4237,7 +4972,7 @@
  * sensor_value_call_set_value_sync:
  * @proxy: A #SensorValueProxy.
  * @arg_value: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorValue.setValue">setValue()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -4282,7 +5017,7 @@
  */
 void
 sensor_value_complete_init (
-    SensorValue *object,
+    SensorValue *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -4301,7 +5036,7 @@
  */
 void
 sensor_value_complete_get_value (
-    SensorValue *object,
+    SensorValue *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     GVariant *value)
 {
@@ -4321,7 +5056,7 @@
  */
 void
 sensor_value_complete_set_value (
-    SensorValue *object,
+    SensorValue *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -4353,11 +5088,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorValueProxy, sensor_value_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (SensorValueProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorValueProxy, sensor_value_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_proxy_iface_init))
 
 #endif
 static void
@@ -4377,7 +5112,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 5);
-  info = _sensor_value_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_value_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -4424,7 +5159,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 5);
-  info = _sensor_value_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_value_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -4445,8 +5180,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_sensor_value_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -4568,7 +5303,7 @@
 {
   SensorValueProxy *proxy = SENSOR_VALUE_PROXY (object);
   GVariant *variant;
-  gboolean value = 0;
+  gboolean value = FALSE;
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "settable");
   if (variant != NULL)
     {
@@ -4626,15 +5361,15 @@
  * sensor_value_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorValue.top_of_page">org.openbmc.SensorValue</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_value_proxy_new_finish() to get the result of the operation.
  *
  * See sensor_value_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -4681,9 +5416,9 @@
  * sensor_value_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorValue.top_of_page">org.openbmc.SensorValue</link>. See g_dbus_proxy_new_sync() for more details.
@@ -4718,13 +5453,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like sensor_value_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_value_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See sensor_value_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -4773,7 +5508,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like sensor_value_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -4842,9 +5577,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -5106,11 +5841,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorValueSkeleton, sensor_value_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (SensorValueSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorValueSkeleton, sensor_value_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_VALUE, sensor_value_skeleton_iface_init))
 
 #endif
 static void
@@ -5253,14 +5988,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   SensorValueSkeleton *skeleton = SENSOR_VALUE_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 5);
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_value_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _sensor_value_schedule_emit_changed (skeleton, _sensor_value_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _sensor_value_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -5293,7 +6031,7 @@
   SensorValueSkeleton *skeleton = SENSOR_VALUE_SKELETON (object);
   GVariant *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_variant (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -5304,7 +6042,7 @@
   SensorValueSkeleton *skeleton = SENSOR_VALUE_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -5315,7 +6053,7 @@
   SensorValueSkeleton *skeleton = SENSOR_VALUE_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -5326,7 +6064,7 @@
   SensorValueSkeleton *skeleton = SENSOR_VALUE_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[3]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[3]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -5337,7 +6075,7 @@
   SensorValueSkeleton *skeleton = SENSOR_VALUE_SKELETON (object);
   gboolean value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_boolean (&(skeleton->priv->properties[4]));
+  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[4]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -5407,6 +6145,15 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-SensorThreshold.top_of_page">org.openbmc.SensorThreshold</link> D-Bus interface in C.
  */
 
+enum
+{
+  _SENSOR_THRESHOLD_WARNING,
+  _SENSOR_THRESHOLD_CRITICAL,
+  _SENSOR_THRESHOLD_NORMAL,
+};
+
+static unsigned _SENSOR_THRESHOLD_SIGNALS[3] = { 0 };
+
 /* ---- Introspection data for org.openbmc.SensorThreshold ---- */
 
 static const _ExtendedGDBusArgInfo _sensor_threshold_method_info_get_state_OUT_ARG_state =
@@ -5420,9 +6167,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _sensor_threshold_method_info_get_state_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _sensor_threshold_method_info_get_state_OUT_ARG_pointers[] =
 {
-  &_sensor_threshold_method_info_get_state_OUT_ARG_state,
+  &_sensor_threshold_method_info_get_state_OUT_ARG_state.parent_struct,
   NULL
 };
 
@@ -5439,9 +6186,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _sensor_threshold_method_info_pointers[] =
+static const GDBusMethodInfo * const _sensor_threshold_method_info_pointers[] =
 {
-  &_sensor_threshold_method_info_get_state,
+  &_sensor_threshold_method_info_get_state.parent_struct,
   NULL
 };
 
@@ -5478,11 +6225,11 @@
   "normal"
 };
 
-static const _ExtendedGDBusSignalInfo * const _sensor_threshold_signal_info_pointers[] =
+static const GDBusSignalInfo * const _sensor_threshold_signal_info_pointers[] =
 {
-  &_sensor_threshold_signal_info_warning,
-  &_sensor_threshold_signal_info_critical,
-  &_sensor_threshold_signal_info_normal,
+  &_sensor_threshold_signal_info_warning.parent_struct,
+  &_sensor_threshold_signal_info_critical.parent_struct,
+  &_sensor_threshold_signal_info_normal.parent_struct,
   NULL
 };
 
@@ -5496,7 +6243,8 @@
     NULL
   },
   "lower-critical",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_threshold_property_info_lower_warning =
@@ -5509,7 +6257,8 @@
     NULL
   },
   "lower-warning",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_threshold_property_info_upper_warning =
@@ -5522,7 +6271,8 @@
     NULL
   },
   "upper-warning",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_threshold_property_info_upper_critical =
@@ -5535,7 +6285,8 @@
     NULL
   },
   "upper-critical",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_threshold_property_info_state =
@@ -5548,16 +6299,17 @@
     NULL
   },
   "state",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _sensor_threshold_property_info_pointers[] =
+static const GDBusPropertyInfo * const _sensor_threshold_property_info_pointers[] =
 {
-  &_sensor_threshold_property_info_lower_critical,
-  &_sensor_threshold_property_info_lower_warning,
-  &_sensor_threshold_property_info_upper_warning,
-  &_sensor_threshold_property_info_upper_critical,
-  &_sensor_threshold_property_info_state,
+  &_sensor_threshold_property_info_lower_critical.parent_struct,
+  &_sensor_threshold_property_info_lower_warning.parent_struct,
+  &_sensor_threshold_property_info_upper_warning.parent_struct,
+  &_sensor_threshold_property_info_upper_critical.parent_struct,
+  &_sensor_threshold_property_info_state.parent_struct,
   NULL
 };
 
@@ -5590,7 +6342,7 @@
 
 /**
  * sensor_threshold_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #SensorThreshold interface for a concrete class.
@@ -5610,6 +6362,58 @@
 }
 
 
+inline static void
+sensor_threshold_signal_marshal_warning (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_threshold_signal_marshal_critical (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_threshold_signal_marshal_normal (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+sensor_threshold_method_marshal_get_state (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * SensorThreshold:
@@ -5634,7 +6438,7 @@
  */
 
 typedef SensorThresholdIface SensorThresholdInterface;
-G_DEFINE_INTERFACE (SensorThreshold, sensor_threshold, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (SensorThreshold, sensor_threshold, G_TYPE_OBJECT)
 
 static void
 sensor_threshold_default_init (SensorThresholdIface *iface)
@@ -5647,9 +6451,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SensorThreshold.getState">getState()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call sensor_threshold_complete_get_state() 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.
+   * 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 sensor_threshold_complete_get_state() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-get-state",
     G_TYPE_FROM_INTERFACE (iface),
@@ -5657,7 +6461,7 @@
     G_STRUCT_OFFSET (SensorThresholdIface, handle_get_state),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      sensor_threshold_method_marshal_get_state,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -5671,15 +6475,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("warning",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorThresholdIface, warning),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _SENSOR_THRESHOLD_SIGNALS[_SENSOR_THRESHOLD_WARNING] =
+    g_signal_new ("warning",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorThresholdIface, warning),
+      NULL,
+      NULL,
+      sensor_threshold_signal_marshal_warning,
+      G_TYPE_NONE,
+      0);
 
   /**
    * SensorThreshold::critical:
@@ -5689,15 +6494,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("critical",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorThresholdIface, critical),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _SENSOR_THRESHOLD_SIGNALS[_SENSOR_THRESHOLD_CRITICAL] =
+    g_signal_new ("critical",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorThresholdIface, critical),
+      NULL,
+      NULL,
+      sensor_threshold_signal_marshal_critical,
+      G_TYPE_NONE,
+      0);
 
   /**
    * SensorThreshold::normal:
@@ -5707,15 +6513,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("normal",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorThresholdIface, normal),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _SENSOR_THRESHOLD_SIGNALS[_SENSOR_THRESHOLD_NORMAL] =
+    g_signal_new ("normal",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorThresholdIface, normal),
+      NULL,
+      NULL,
+      sensor_threshold_signal_marshal_normal,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -5773,13 +6580,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_threshold_dup_lower_critical() if on another thread.</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 sensor_threshold_dup_lower_critical() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 GVariant *
 sensor_threshold_get_lower_critical (SensorThreshold *object)
 {
+  g_return_val_if_fail (IS_SENSOR_THRESHOLD (object), NULL);
+
   return SENSOR_THRESHOLD_GET_IFACE (object)->get_lower_critical (object);
 }
 
@@ -5791,7 +6600,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
  */
 GVariant *
 sensor_threshold_dup_lower_critical (SensorThreshold *object)
@@ -5824,13 +6633,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_threshold_dup_lower_warning() if on another thread.</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 sensor_threshold_dup_lower_warning() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 GVariant *
 sensor_threshold_get_lower_warning (SensorThreshold *object)
 {
+  g_return_val_if_fail (IS_SENSOR_THRESHOLD (object), NULL);
+
   return SENSOR_THRESHOLD_GET_IFACE (object)->get_lower_warning (object);
 }
 
@@ -5842,7 +6653,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
  */
 GVariant *
 sensor_threshold_dup_lower_warning (SensorThreshold *object)
@@ -5875,13 +6686,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_threshold_dup_upper_warning() if on another thread.</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 sensor_threshold_dup_upper_warning() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 GVariant *
 sensor_threshold_get_upper_warning (SensorThreshold *object)
 {
+  g_return_val_if_fail (IS_SENSOR_THRESHOLD (object), NULL);
+
   return SENSOR_THRESHOLD_GET_IFACE (object)->get_upper_warning (object);
 }
 
@@ -5893,7 +6706,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
  */
 GVariant *
 sensor_threshold_dup_upper_warning (SensorThreshold *object)
@@ -5926,13 +6739,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_threshold_dup_upper_critical() if on another thread.</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 sensor_threshold_dup_upper_critical() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 GVariant *
 sensor_threshold_get_upper_critical (SensorThreshold *object)
 {
+  g_return_val_if_fail (IS_SENSOR_THRESHOLD (object), NULL);
+
   return SENSOR_THRESHOLD_GET_IFACE (object)->get_upper_critical (object);
 }
 
@@ -5944,7 +6759,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
  */
 GVariant *
 sensor_threshold_dup_upper_critical (SensorThreshold *object)
@@ -5982,6 +6797,8 @@
 guchar 
 sensor_threshold_get_state (SensorThreshold *object)
 {
+  g_return_val_if_fail (IS_SENSOR_THRESHOLD (object), '\0');
+
   return SENSOR_THRESHOLD_GET_IFACE (object)->get_state (object);
 }
 
@@ -6010,7 +6827,7 @@
 sensor_threshold_emit_warning (
     SensorThreshold *object)
 {
-  g_signal_emit_by_name (object, "warning");
+  g_signal_emit (object, _SENSOR_THRESHOLD_SIGNALS[_SENSOR_THRESHOLD_WARNING], 0);
 }
 
 /**
@@ -6023,7 +6840,7 @@
 sensor_threshold_emit_critical (
     SensorThreshold *object)
 {
-  g_signal_emit_by_name (object, "critical");
+  g_signal_emit (object, _SENSOR_THRESHOLD_SIGNALS[_SENSOR_THRESHOLD_CRITICAL], 0);
 }
 
 /**
@@ -6036,18 +6853,18 @@
 sensor_threshold_emit_normal (
     SensorThreshold *object)
 {
-  g_signal_emit_by_name (object, "normal");
+  g_signal_emit (object, _SENSOR_THRESHOLD_SIGNALS[_SENSOR_THRESHOLD_NORMAL], 0);
 }
 
 /**
  * sensor_threshold_call_get_state:
  * @proxy: A #SensorThresholdProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorThreshold.getState">getState()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_threshold_call_get_state_finish() to get the result of the operation.
  *
  * See sensor_threshold_call_get_state_sync() for the synchronous, blocking version of this method.
@@ -6072,7 +6889,7 @@
 /**
  * sensor_threshold_call_get_state_finish:
  * @proxy: A #SensorThresholdProxy.
- * @out_state: (out): Return location for return parameter or %NULL to ignore.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to sensor_threshold_call_get_state().
  * @error: Return location for error or %NULL.
  *
@@ -6102,8 +6919,8 @@
 /**
  * sensor_threshold_call_get_state_sync:
  * @proxy: A #SensorThresholdProxy.
- * @out_state: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SensorThreshold.getState">getState()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -6149,7 +6966,7 @@
  */
 void
 sensor_threshold_complete_get_state (
-    SensorThreshold *object,
+    SensorThreshold *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     guchar state)
 {
@@ -6183,11 +7000,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorThresholdProxy, sensor_threshold_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (SensorThresholdProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorThresholdProxy, sensor_threshold_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_proxy_iface_init))
 
 #endif
 static void
@@ -6207,7 +7024,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 5);
-  info = _sensor_threshold_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_threshold_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -6254,7 +7071,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 5);
-  info = _sensor_threshold_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_threshold_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -6275,8 +7092,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_sensor_threshold_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -6392,7 +7209,7 @@
 {
   SensorThresholdProxy *proxy = SENSOR_THRESHOLD_PROXY (object);
   GVariant *variant;
-  guchar value = 0;
+  guchar value = '\0';
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "state");
   if (variant != NULL)
     {
@@ -6450,15 +7267,15 @@
  * sensor_threshold_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorThreshold.top_of_page">org.openbmc.SensorThreshold</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_threshold_proxy_new_finish() to get the result of the operation.
  *
  * See sensor_threshold_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -6505,9 +7322,9 @@
  * sensor_threshold_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorThreshold.top_of_page">org.openbmc.SensorThreshold</link>. See g_dbus_proxy_new_sync() for more details.
@@ -6542,13 +7359,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like sensor_threshold_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_threshold_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See sensor_threshold_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -6597,7 +7414,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like sensor_threshold_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -6666,9 +7483,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -6924,11 +7741,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorThresholdSkeleton, sensor_threshold_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (SensorThresholdSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorThresholdSkeleton, sensor_threshold_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_THRESHOLD, sensor_threshold_skeleton_iface_init))
 
 #endif
 static void
@@ -7071,14 +7888,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   SensorThresholdSkeleton *skeleton = SENSOR_THRESHOLD_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 5);
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_threshold_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _sensor_threshold_schedule_emit_changed (skeleton, _sensor_threshold_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _sensor_threshold_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -7111,7 +7931,7 @@
   SensorThresholdSkeleton *skeleton = SENSOR_THRESHOLD_SKELETON (object);
   GVariant *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_variant (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -7122,7 +7942,7 @@
   SensorThresholdSkeleton *skeleton = SENSOR_THRESHOLD_SKELETON (object);
   GVariant *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_variant (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -7133,7 +7953,7 @@
   SensorThresholdSkeleton *skeleton = SENSOR_THRESHOLD_SKELETON (object);
   GVariant *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_variant (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -7144,7 +7964,7 @@
   SensorThresholdSkeleton *skeleton = SENSOR_THRESHOLD_SKELETON (object);
   GVariant *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_variant (&(skeleton->priv->properties[3]));
+  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[3]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -7155,7 +7975,7 @@
   SensorThresholdSkeleton *skeleton = SENSOR_THRESHOLD_SKELETON (object);
   guchar value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_uchar (&(skeleton->priv->properties[4]));
+  value = g_marshal_value_peek_uchar (&(skeleton->priv->properties[4]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -7237,7 +8057,8 @@
     NULL
   },
   "dev-path",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_i2c_property_info_address =
@@ -7250,13 +8071,14 @@
     NULL
   },
   "address",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _sensor_i2c_property_info_pointers[] =
+static const GDBusPropertyInfo * const _sensor_i2c_property_info_pointers[] =
 {
-  &_sensor_i2c_property_info_dev_path,
-  &_sensor_i2c_property_info_address,
+  &_sensor_i2c_property_info_dev_path.parent_struct,
+  &_sensor_i2c_property_info_address.parent_struct,
   NULL
 };
 
@@ -7289,7 +8111,7 @@
 
 /**
  * sensor_i2c_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #SensorI2c interface for a concrete class.
@@ -7323,7 +8145,7 @@
  */
 
 typedef SensorI2cIface SensorI2cInterface;
-G_DEFINE_INTERFACE (SensorI2c, sensor_i2c, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (SensorI2c, sensor_i2c, G_TYPE_OBJECT)
 
 static void
 sensor_i2c_default_init (SensorI2cIface *iface)
@@ -7357,13 +8179,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_i2c_dup_dev_path() if on another thread.</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 sensor_i2c_dup_dev_path() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 sensor_i2c_get_dev_path (SensorI2c *object)
 {
+  g_return_val_if_fail (IS_SENSOR_I2C (object), NULL);
+
   return SENSOR_I2C_GET_IFACE (object)->get_dev_path (object);
 }
 
@@ -7375,7 +8199,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 sensor_i2c_dup_dev_path (SensorI2c *object)
@@ -7408,13 +8232,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_i2c_dup_address() if on another thread.</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 sensor_i2c_dup_address() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 sensor_i2c_get_address (SensorI2c *object)
 {
+  g_return_val_if_fail (IS_SENSOR_I2C (object), NULL);
+
   return SENSOR_I2C_GET_IFACE (object)->get_address (object);
 }
 
@@ -7426,7 +8252,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 sensor_i2c_dup_address (SensorI2c *object)
@@ -7476,11 +8302,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorI2cProxy, sensor_i2c_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (SensorI2cProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorI2cProxy, sensor_i2c_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_proxy_iface_init))
 
 #endif
 static void
@@ -7500,7 +8326,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _sensor_i2c_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_i2c_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -7547,7 +8373,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _sensor_i2c_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_i2c_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -7568,8 +8394,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_sensor_i2c_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -7703,15 +8529,15 @@
  * sensor_i2c_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorI2c.top_of_page">org.openbmc.SensorI2c</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_i2c_proxy_new_finish() to get the result of the operation.
  *
  * See sensor_i2c_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -7758,9 +8584,9 @@
  * sensor_i2c_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorI2c.top_of_page">org.openbmc.SensorI2c</link>. See g_dbus_proxy_new_sync() for more details.
@@ -7795,13 +8621,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like sensor_i2c_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_i2c_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See sensor_i2c_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -7850,7 +8676,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like sensor_i2c_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -7919,9 +8745,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -8111,11 +8937,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorI2cSkeleton, sensor_i2c_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (SensorI2cSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorI2cSkeleton, sensor_i2c_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_I2C, sensor_i2c_skeleton_iface_init))
 
 #endif
 static void
@@ -8258,14 +9084,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   SensorI2cSkeleton *skeleton = SENSOR_I2C_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_i2c_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _sensor_i2c_schedule_emit_changed (skeleton, _sensor_i2c_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _sensor_i2c_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -8295,7 +9124,7 @@
   SensorI2cSkeleton *skeleton = SENSOR_I2C_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -8306,7 +9135,7 @@
   SensorI2cSkeleton *skeleton = SENSOR_I2C_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -8370,6 +9199,13 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-SensorMatch.top_of_page">org.openbmc.SensorMatch</link> D-Bus interface in C.
  */
 
+enum
+{
+  _SENSOR_MATCH_SENSOR_MATCH,
+};
+
+static unsigned _SENSOR_MATCH_SIGNALS[1] = { 0 };
+
 /* ---- Introspection data for org.openbmc.SensorMatch ---- */
 
 static const _ExtendedGDBusArgInfo _sensor_match_signal_info_sensor_match_ARG_state =
@@ -8383,9 +9219,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _sensor_match_signal_info_sensor_match_ARG_pointers[] =
+static const GDBusArgInfo * const _sensor_match_signal_info_sensor_match_ARG_pointers[] =
 {
-  &_sensor_match_signal_info_sensor_match_ARG_state,
+  &_sensor_match_signal_info_sensor_match_ARG_state.parent_struct,
   NULL
 };
 
@@ -8400,9 +9236,9 @@
   "sensor-match"
 };
 
-static const _ExtendedGDBusSignalInfo * const _sensor_match_signal_info_pointers[] =
+static const GDBusSignalInfo * const _sensor_match_signal_info_pointers[] =
 {
-  &_sensor_match_signal_info_sensor_match,
+  &_sensor_match_signal_info_sensor_match.parent_struct,
   NULL
 };
 
@@ -8416,7 +9252,8 @@
     NULL
   },
   "match-value",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _sensor_match_property_info_state =
@@ -8429,13 +9266,14 @@
     NULL
   },
   "state",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _sensor_match_property_info_pointers[] =
+static const GDBusPropertyInfo * const _sensor_match_property_info_pointers[] =
 {
-  &_sensor_match_property_info_match_value,
-  &_sensor_match_property_info_state,
+  &_sensor_match_property_info_match_value.parent_struct,
+  &_sensor_match_property_info_state.parent_struct,
   NULL
 };
 
@@ -8468,7 +9306,7 @@
 
 /**
  * sensor_match_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #SensorMatch interface for a concrete class.
@@ -8485,6 +9323,19 @@
 }
 
 
+inline static void
+sensor_match_signal_marshal_sensor_match (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__UCHAR (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * SensorMatch:
@@ -8503,7 +9354,7 @@
  */
 
 typedef SensorMatchIface SensorMatchInterface;
-G_DEFINE_INTERFACE (SensorMatch, sensor_match, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (SensorMatch, sensor_match, G_TYPE_OBJECT)
 
 static void
 sensor_match_default_init (SensorMatchIface *iface)
@@ -8518,15 +9369,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("sensor-match",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (SensorMatchIface, sensor_match),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    1, G_TYPE_UCHAR);
+  _SENSOR_MATCH_SIGNALS[_SENSOR_MATCH_SENSOR_MATCH] =
+    g_signal_new ("sensor-match",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (SensorMatchIface, sensor_match),
+      NULL,
+      NULL,
+      sensor_match_signal_marshal_sensor_match,
+      G_TYPE_NONE,
+      1, G_TYPE_UCHAR);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -8557,13 +9409,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 sensor_match_dup_match_value() if on another thread.</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 sensor_match_dup_match_value() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 GVariant *
 sensor_match_get_match_value (SensorMatch *object)
 {
+  g_return_val_if_fail (IS_SENSOR_MATCH (object), NULL);
+
   return SENSOR_MATCH_GET_IFACE (object)->get_match_value (object);
 }
 
@@ -8575,7 +9429,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_variant_unref().
  */
 GVariant *
 sensor_match_dup_match_value (SensorMatch *object)
@@ -8613,6 +9467,8 @@
 guchar 
 sensor_match_get_state (SensorMatch *object)
 {
+  g_return_val_if_fail (IS_SENSOR_MATCH (object), '\0');
+
   return SENSOR_MATCH_GET_IFACE (object)->get_state (object);
 }
 
@@ -8643,7 +9499,7 @@
     SensorMatch *object,
     guchar arg_state)
 {
-  g_signal_emit_by_name (object, "sensor-match", arg_state);
+  g_signal_emit (object, _SENSOR_MATCH_SIGNALS[_SENSOR_MATCH_SENSOR_MATCH], 0, arg_state);
 }
 
 /* ------------------------------------------------------------------------ */
@@ -8671,11 +9527,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorMatchProxy, sensor_match_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (SensorMatchProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorMatchProxy, sensor_match_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_proxy_iface_init))
 
 #endif
 static void
@@ -8695,7 +9551,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _sensor_match_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_match_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -8742,7 +9598,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _sensor_match_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_match_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -8763,8 +9619,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_sensor_match_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -8841,7 +9697,7 @@
 {
   SensorMatchProxy *proxy = SENSOR_MATCH_PROXY (object);
   GVariant *variant;
-  guchar value = 0;
+  guchar value = '\0';
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "state");
   if (variant != NULL)
     {
@@ -8896,15 +9752,15 @@
  * sensor_match_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorMatch.top_of_page">org.openbmc.SensorMatch</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_match_proxy_new_finish() to get the result of the operation.
  *
  * See sensor_match_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -8951,9 +9807,9 @@
  * sensor_match_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorMatch.top_of_page">org.openbmc.SensorMatch</link>. See g_dbus_proxy_new_sync() for more details.
@@ -8988,13 +9844,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like sensor_match_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call sensor_match_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See sensor_match_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -9043,7 +9899,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like sensor_match_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -9112,9 +9968,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -9328,11 +10184,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SensorMatchSkeleton, sensor_match_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (SensorMatchSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SensorMatchSkeleton, sensor_match_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SENSOR_MATCH, sensor_match_skeleton_iface_init))
 
 #endif
 static void
@@ -9475,14 +10331,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   SensorMatchSkeleton *skeleton = SENSOR_MATCH_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _sensor_match_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _sensor_match_schedule_emit_changed (skeleton, _sensor_match_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _sensor_match_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -9512,7 +10371,7 @@
   SensorMatchSkeleton *skeleton = SENSOR_MATCH_SKELETON (object);
   GVariant *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_variant (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_variant (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -9523,7 +10382,7 @@
   SensorMatchSkeleton *skeleton = SENSOR_MATCH_SKELETON (object);
   guchar value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_uchar (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_uchar (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -9603,9 +10462,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _process_method_info_pointers[] =
+static const GDBusMethodInfo * const _process_method_info_pointers[] =
 {
-  &_process_method_info_stop,
+  &_process_method_info_stop.parent_struct,
   NULL
 };
 
@@ -9638,7 +10497,7 @@
 
 /**
  * process_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Process interface for a concrete class.
@@ -9647,12 +10506,25 @@
  * Returns: The last property id.
  */
 guint
-process_override_properties (GObjectClass *klass, guint property_id_begin)
+process_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
 {
   return property_id_begin - 1;
 }
 
 
+inline static void
+process_method_marshal_stop (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Process:
@@ -9669,7 +10541,7 @@
  */
 
 typedef ProcessIface ProcessInterface;
-G_DEFINE_INTERFACE (Process, process, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Process, process, G_TYPE_OBJECT)
 
 static void
 process_default_init (ProcessIface *iface)
@@ -9682,9 +10554,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Process.stop">stop()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call process_complete_stop() 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.
+   * 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 process_complete_stop() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-stop",
     G_TYPE_FROM_INTERFACE (iface),
@@ -9692,7 +10564,7 @@
     G_STRUCT_OFFSET (ProcessIface, handle_stop),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      process_method_marshal_stop,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -9702,12 +10574,12 @@
 /**
  * process_call_stop:
  * @proxy: A #ProcessProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Process.stop">stop()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call process_call_stop_finish() to get the result of the operation.
  *
  * See process_call_stop_sync() for the synchronous, blocking version of this method.
@@ -9759,7 +10631,7 @@
 /**
  * process_call_stop_sync:
  * @proxy: A #ProcessProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Process.stop">stop()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -9802,7 +10674,7 @@
  */
 void
 process_complete_stop (
-    Process *object,
+    Process *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -9834,11 +10706,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ProcessProxy, process_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ProcessProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ProcessProxy, process_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_proxy_iface_init))
 
 #endif
 static void
@@ -9850,17 +10722,17 @@
 }
 
 static void
-process_proxy_get_property (GObject      *object,
-  guint         prop_id,
-  GValue       *value,
+process_proxy_get_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  GValue       *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
 
 static void
-process_proxy_set_property (GObject      *object,
-  guint         prop_id,
-  const GValue *value,
+process_proxy_set_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  const GValue *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
@@ -9875,8 +10747,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_process_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -9968,7 +10840,7 @@
 }
 
 static void
-process_proxy_iface_init (ProcessIface *iface)
+process_proxy_iface_init (ProcessIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -9976,15 +10848,15 @@
  * process_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Process.top_of_page">org.openbmc.Process</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call process_proxy_new_finish() to get the result of the operation.
  *
  * See process_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -10031,9 +10903,9 @@
  * process_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Process.top_of_page">org.openbmc.Process</link>. See g_dbus_proxy_new_sync() for more details.
@@ -10068,13 +10940,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like process_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call process_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See process_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -10123,7 +10995,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like process_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -10192,9 +11064,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -10360,7 +11232,7 @@
 }
 
 static void
-process_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+process_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
 {
 }
 
@@ -10368,11 +11240,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ProcessSkeleton, process_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ProcessSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ProcessSkeleton, process_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_PROCESS, process_skeleton_iface_init))
 
 #endif
 static void
@@ -10421,7 +11293,7 @@
 }
 
 static void
-process_skeleton_iface_init (ProcessIface *iface)
+process_skeleton_iface_init (ProcessIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -10464,9 +11336,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _shared_resource_method_info_lock_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _shared_resource_method_info_lock_IN_ARG_pointers[] =
 {
-  &_shared_resource_method_info_lock_IN_ARG_name,
+  &_shared_resource_method_info_lock_IN_ARG_name.parent_struct,
   NULL
 };
 
@@ -10518,10 +11390,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _shared_resource_method_info_is_locked_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _shared_resource_method_info_is_locked_OUT_ARG_pointers[] =
 {
-  &_shared_resource_method_info_is_locked_OUT_ARG_lock,
-  &_shared_resource_method_info_is_locked_OUT_ARG_name,
+  &_shared_resource_method_info_is_locked_OUT_ARG_lock.parent_struct,
+  &_shared_resource_method_info_is_locked_OUT_ARG_name.parent_struct,
   NULL
 };
 
@@ -10538,11 +11410,11 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _shared_resource_method_info_pointers[] =
+static const GDBusMethodInfo * const _shared_resource_method_info_pointers[] =
 {
-  &_shared_resource_method_info_lock,
-  &_shared_resource_method_info_unlock,
-  &_shared_resource_method_info_is_locked,
+  &_shared_resource_method_info_lock.parent_struct,
+  &_shared_resource_method_info_unlock.parent_struct,
+  &_shared_resource_method_info_is_locked.parent_struct,
   NULL
 };
 
@@ -10556,7 +11428,8 @@
     NULL
   },
   "lock",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _shared_resource_property_info_name =
@@ -10569,13 +11442,14 @@
     NULL
   },
   "name",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _shared_resource_property_info_pointers[] =
+static const GDBusPropertyInfo * const _shared_resource_property_info_pointers[] =
 {
-  &_shared_resource_property_info_lock,
-  &_shared_resource_property_info_name,
+  &_shared_resource_property_info_lock.parent_struct,
+  &_shared_resource_property_info_name.parent_struct,
   NULL
 };
 
@@ -10608,7 +11482,7 @@
 
 /**
  * shared_resource_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #SharedResource interface for a concrete class.
@@ -10625,6 +11499,45 @@
 }
 
 
+inline static void
+shared_resource_method_marshal_lock (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+shared_resource_method_marshal_unlock (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+shared_resource_method_marshal_is_locked (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * SharedResource:
@@ -10645,7 +11558,7 @@
  */
 
 typedef SharedResourceIface SharedResourceInterface;
-G_DEFINE_INTERFACE (SharedResource, shared_resource, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (SharedResource, shared_resource, G_TYPE_OBJECT)
 
 static void
 shared_resource_default_init (SharedResourceIface *iface)
@@ -10659,9 +11572,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SharedResource.lock">lock()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call shared_resource_complete_lock() 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.
+   * 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 shared_resource_complete_lock() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-lock",
     G_TYPE_FROM_INTERFACE (iface),
@@ -10669,7 +11582,7 @@
     G_STRUCT_OFFSET (SharedResourceIface, handle_lock),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      shared_resource_method_marshal_lock,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
@@ -10681,9 +11594,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SharedResource.unlock">unlock()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call shared_resource_complete_unlock() 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.
+   * 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 shared_resource_complete_unlock() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-unlock",
     G_TYPE_FROM_INTERFACE (iface),
@@ -10691,7 +11604,7 @@
     G_STRUCT_OFFSET (SharedResourceIface, handle_unlock),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      shared_resource_method_marshal_unlock,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -10703,9 +11616,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-SharedResource.isLocked">isLocked()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call shared_resource_complete_is_locked() 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.
+   * 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 shared_resource_complete_is_locked() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-is-locked",
     G_TYPE_FROM_INTERFACE (iface),
@@ -10713,7 +11626,7 @@
     G_STRUCT_OFFSET (SharedResourceIface, handle_is_locked),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      shared_resource_method_marshal_is_locked,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -10752,6 +11665,8 @@
 gboolean 
 shared_resource_get_lock (SharedResource *object)
 {
+  g_return_val_if_fail (IS_SHARED_RESOURCE (object), FALSE);
+
   return SHARED_RESOURCE_GET_IFACE (object)->get_lock (object);
 }
 
@@ -10778,13 +11693,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 shared_resource_dup_name() if on another thread.</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 shared_resource_dup_name() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 shared_resource_get_name (SharedResource *object)
 {
+  g_return_val_if_fail (IS_SHARED_RESOURCE (object), NULL);
+
   return SHARED_RESOURCE_GET_IFACE (object)->get_name (object);
 }
 
@@ -10796,7 +11713,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 shared_resource_dup_name (SharedResource *object)
@@ -10825,12 +11742,12 @@
  * shared_resource_call_lock:
  * @proxy: A #SharedResourceProxy.
  * @arg_name: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SharedResource.lock">lock()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call shared_resource_call_lock_finish() to get the result of the operation.
  *
  * See shared_resource_call_lock_sync() for the synchronous, blocking version of this method.
@@ -10885,7 +11802,7 @@
  * shared_resource_call_lock_sync:
  * @proxy: A #SharedResourceProxy.
  * @arg_name: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SharedResource.lock">lock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -10922,12 +11839,12 @@
 /**
  * shared_resource_call_unlock:
  * @proxy: A #SharedResourceProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SharedResource.unlock">unlock()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call shared_resource_call_unlock_finish() to get the result of the operation.
  *
  * See shared_resource_call_unlock_sync() for the synchronous, blocking version of this method.
@@ -10979,7 +11896,7 @@
 /**
  * shared_resource_call_unlock_sync:
  * @proxy: A #SharedResourceProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SharedResource.unlock">unlock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -11014,12 +11931,12 @@
 /**
  * shared_resource_call_is_locked:
  * @proxy: A #SharedResourceProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-SharedResource.isLocked">isLocked()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call shared_resource_call_is_locked_finish() to get the result of the operation.
  *
  * See shared_resource_call_is_locked_sync() for the synchronous, blocking version of this method.
@@ -11044,8 +11961,8 @@
 /**
  * shared_resource_call_is_locked_finish:
  * @proxy: A #SharedResourceProxy.
- * @out_lock: (out): Return location for return parameter or %NULL to ignore.
- * @out_name: (out): Return location for return parameter or %NULL to ignore.
+ * @out_lock: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_name: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to shared_resource_call_is_locked().
  * @error: Return location for error or %NULL.
  *
@@ -11077,9 +11994,9 @@
 /**
  * shared_resource_call_is_locked_sync:
  * @proxy: A #SharedResourceProxy.
- * @out_lock: (out): Return location for return parameter or %NULL to ignore.
- * @out_name: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_lock: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_name: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-SharedResource.isLocked">isLocked()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -11126,7 +12043,7 @@
  */
 void
 shared_resource_complete_lock (
-    SharedResource *object,
+    SharedResource *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -11144,7 +12061,7 @@
  */
 void
 shared_resource_complete_unlock (
-    SharedResource *object,
+    SharedResource *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -11164,7 +12081,7 @@
  */
 void
 shared_resource_complete_is_locked (
-    SharedResource *object,
+    SharedResource *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     gboolean lock,
     const gchar *name)
@@ -11200,11 +12117,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SharedResourceProxy, shared_resource_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (SharedResourceProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SharedResourceProxy, shared_resource_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_proxy_iface_init))
 
 #endif
 static void
@@ -11224,7 +12141,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _shared_resource_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _shared_resource_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -11271,7 +12188,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _shared_resource_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _shared_resource_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -11292,8 +12209,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_shared_resource_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -11357,7 +12274,7 @@
 {
   SharedResourceProxy *proxy = SHARED_RESOURCE_PROXY (object);
   GVariant *variant;
-  gboolean value = 0;
+  gboolean value = FALSE;
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "lock");
   if (variant != NULL)
     {
@@ -11427,15 +12344,15 @@
  * shared_resource_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SharedResource.top_of_page">org.openbmc.SharedResource</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call shared_resource_proxy_new_finish() to get the result of the operation.
  *
  * See shared_resource_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -11482,9 +12399,9 @@
  * shared_resource_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SharedResource.top_of_page">org.openbmc.SharedResource</link>. See g_dbus_proxy_new_sync() for more details.
@@ -11519,13 +12436,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like shared_resource_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call shared_resource_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See shared_resource_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -11574,7 +12491,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like shared_resource_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -11643,9 +12560,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -11835,11 +12752,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (SharedResourceSkeleton, shared_resource_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (SharedResourceSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (SharedResourceSkeleton, shared_resource_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_SHARED_RESOURCE, shared_resource_skeleton_iface_init))
 
 #endif
 static void
@@ -11982,14 +12899,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   SharedResourceSkeleton *skeleton = SHARED_RESOURCE_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _shared_resource_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _shared_resource_schedule_emit_changed (skeleton, _shared_resource_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _shared_resource_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -12019,7 +12939,7 @@
   SharedResourceSkeleton *skeleton = SHARED_RESOURCE_SKELETON (object);
   gboolean value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_boolean (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -12030,7 +12950,7 @@
   SharedResourceSkeleton *skeleton = SHARED_RESOURCE_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -12094,6 +13014,14 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-Control.top_of_page">org.openbmc.Control</link> D-Bus interface in C.
  */
 
+enum
+{
+  _CONTROL_HEARTBEAT,
+  _CONTROL_STARTED,
+};
+
+static unsigned _CONTROL_SIGNALS[2] = { 0 };
+
 /* ---- Introspection data for org.openbmc.Control ---- */
 
 static const _ExtendedGDBusMethodInfo _control_method_info_init =
@@ -12109,9 +13037,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _control_method_info_pointers[] =
+static const GDBusMethodInfo * const _control_method_info_pointers[] =
 {
-  &_control_method_info_init,
+  &_control_method_info_init.parent_struct,
   NULL
 };
 
@@ -12126,9 +13054,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _control_signal_info_heartbeat_ARG_pointers[] =
+static const GDBusArgInfo * const _control_signal_info_heartbeat_ARG_pointers[] =
 {
-  &_control_signal_info_heartbeat_ARG_bus_name,
+  &_control_signal_info_heartbeat_ARG_bus_name.parent_struct,
   NULL
 };
 
@@ -12154,10 +13082,10 @@
   "started"
 };
 
-static const _ExtendedGDBusSignalInfo * const _control_signal_info_pointers[] =
+static const GDBusSignalInfo * const _control_signal_info_pointers[] =
 {
-  &_control_signal_info_heartbeat,
-  &_control_signal_info_started,
+  &_control_signal_info_heartbeat.parent_struct,
+  &_control_signal_info_started.parent_struct,
   NULL
 };
 
@@ -12171,7 +13099,8 @@
     NULL
   },
   "poll-interval",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _control_property_info_heatbeat =
@@ -12184,13 +13113,14 @@
     NULL
   },
   "heatbeat",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _control_property_info_pointers[] =
+static const GDBusPropertyInfo * const _control_property_info_pointers[] =
 {
-  &_control_property_info_poll_interval,
-  &_control_property_info_heatbeat,
+  &_control_property_info_poll_interval.parent_struct,
+  &_control_property_info_heatbeat.parent_struct,
   NULL
 };
 
@@ -12223,7 +13153,7 @@
 
 /**
  * control_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Control interface for a concrete class.
@@ -12240,6 +13170,45 @@
 }
 
 
+inline static void
+control_signal_marshal_heartbeat (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_signal_marshal_started (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_method_marshal_init (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Control:
@@ -12260,7 +13229,7 @@
  */
 
 typedef ControlIface ControlInterface;
-G_DEFINE_INTERFACE (Control, control, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Control, control, G_TYPE_OBJECT)
 
 static void
 control_default_init (ControlIface *iface)
@@ -12273,9 +13242,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Control.init">init()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_complete_init() 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.
+   * 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 control_complete_init() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-init",
     G_TYPE_FROM_INTERFACE (iface),
@@ -12283,7 +13252,7 @@
     G_STRUCT_OFFSET (ControlIface, handle_init),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_method_marshal_init,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -12298,15 +13267,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("heartbeat",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ControlIface, heartbeat),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    1, G_TYPE_STRING);
+  _CONTROL_SIGNALS[_CONTROL_HEARTBEAT] =
+    g_signal_new ("heartbeat",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ControlIface, heartbeat),
+      NULL,
+      NULL,
+      control_signal_marshal_heartbeat,
+      G_TYPE_NONE,
+      1, G_TYPE_STRING);
 
   /**
    * Control::started:
@@ -12316,15 +13286,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("started",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ControlIface, started),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _CONTROL_SIGNALS[_CONTROL_STARTED] =
+    g_signal_new ("started",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ControlIface, started),
+      NULL,
+      NULL,
+      control_signal_marshal_started,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -12360,6 +13331,8 @@
 gint 
 control_get_poll_interval (Control *object)
 {
+  g_return_val_if_fail (IS_CONTROL (object), 0);
+
   return CONTROL_GET_IFACE (object)->get_poll_interval (object);
 }
 
@@ -12391,6 +13364,8 @@
 gint 
 control_get_heatbeat (Control *object)
 {
+  g_return_val_if_fail (IS_CONTROL (object), 0);
+
   return CONTROL_GET_IFACE (object)->get_heatbeat (object);
 }
 
@@ -12421,7 +13396,7 @@
     Control *object,
     const gchar *arg_bus_name)
 {
-  g_signal_emit_by_name (object, "heartbeat", arg_bus_name);
+  g_signal_emit (object, _CONTROL_SIGNALS[_CONTROL_HEARTBEAT], 0, arg_bus_name);
 }
 
 /**
@@ -12434,18 +13409,18 @@
 control_emit_started (
     Control *object)
 {
-  g_signal_emit_by_name (object, "started");
+  g_signal_emit (object, _CONTROL_SIGNALS[_CONTROL_STARTED], 0);
 }
 
 /**
  * control_call_init:
  * @proxy: A #ControlProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Control.init">init()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_call_init_finish() to get the result of the operation.
  *
  * See control_call_init_sync() for the synchronous, blocking version of this method.
@@ -12497,7 +13472,7 @@
 /**
  * control_call_init_sync:
  * @proxy: A #ControlProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Control.init">init()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -12540,7 +13515,7 @@
  */
 void
 control_complete_init (
-    Control *object,
+    Control *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -12572,11 +13547,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlProxy, control_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ControlProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlProxy, control_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_proxy_iface_init))
 
 #endif
 static void
@@ -12596,7 +13571,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _control_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _control_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -12643,7 +13618,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _control_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _control_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -12664,8 +13639,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_control_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -12799,15 +13774,15 @@
  * control_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Control.top_of_page">org.openbmc.Control</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_proxy_new_finish() to get the result of the operation.
  *
  * See control_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -12854,9 +13829,9 @@
  * control_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Control.top_of_page">org.openbmc.Control</link>. See g_dbus_proxy_new_sync() for more details.
@@ -12891,13 +13866,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like control_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See control_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -12946,7 +13921,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like control_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -13015,9 +13990,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -13253,11 +14228,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlSkeleton, control_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ControlSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlSkeleton, control_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL, control_skeleton_iface_init))
 
 #endif
 static void
@@ -13400,14 +14375,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   ControlSkeleton *skeleton = CONTROL_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _control_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _control_schedule_emit_changed (skeleton, _control_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _control_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -13437,7 +14415,7 @@
   ControlSkeleton *skeleton = CONTROL_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -13448,7 +14426,7 @@
   ControlSkeleton *skeleton = CONTROL_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -13542,10 +14520,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _control_bmc_method_info_pointers[] =
+static const GDBusMethodInfo * const _control_bmc_method_info_pointers[] =
 {
-  &_control_bmc_method_info_cold_reset,
-  &_control_bmc_method_info_warm_reset,
+  &_control_bmc_method_info_cold_reset.parent_struct,
+  &_control_bmc_method_info_warm_reset.parent_struct,
   NULL
 };
 
@@ -13578,7 +14556,7 @@
 
 /**
  * control_bmc_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #ControlBmc interface for a concrete class.
@@ -13587,12 +14565,38 @@
  * Returns: The last property id.
  */
 guint
-control_bmc_override_properties (GObjectClass *klass, guint property_id_begin)
+control_bmc_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
 {
   return property_id_begin - 1;
 }
 
 
+inline static void
+control_bmc_method_marshal_cold_reset (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_bmc_method_marshal_warm_reset (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * ControlBmc:
@@ -13610,7 +14614,7 @@
  */
 
 typedef ControlBmcIface ControlBmcInterface;
-G_DEFINE_INTERFACE (ControlBmc, control_bmc, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (ControlBmc, control_bmc, G_TYPE_OBJECT)
 
 static void
 control_bmc_default_init (ControlBmcIface *iface)
@@ -13623,9 +14627,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Bmc.coldReset">coldReset()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_bmc_complete_cold_reset() 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.
+   * 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 control_bmc_complete_cold_reset() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-cold-reset",
     G_TYPE_FROM_INTERFACE (iface),
@@ -13633,7 +14637,7 @@
     G_STRUCT_OFFSET (ControlBmcIface, handle_cold_reset),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_bmc_method_marshal_cold_reset,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -13645,9 +14649,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Bmc.warmReset">warmReset()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_bmc_complete_warm_reset() 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.
+   * 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 control_bmc_complete_warm_reset() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-warm-reset",
     G_TYPE_FROM_INTERFACE (iface),
@@ -13655,7 +14659,7 @@
     G_STRUCT_OFFSET (ControlBmcIface, handle_warm_reset),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_bmc_method_marshal_warm_reset,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -13665,12 +14669,12 @@
 /**
  * control_bmc_call_cold_reset:
  * @proxy: A #ControlBmcProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Bmc.coldReset">coldReset()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_bmc_call_cold_reset_finish() to get the result of the operation.
  *
  * See control_bmc_call_cold_reset_sync() for the synchronous, blocking version of this method.
@@ -13722,7 +14726,7 @@
 /**
  * control_bmc_call_cold_reset_sync:
  * @proxy: A #ControlBmcProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Bmc.coldReset">coldReset()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -13757,12 +14761,12 @@
 /**
  * control_bmc_call_warm_reset:
  * @proxy: A #ControlBmcProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Bmc.warmReset">warmReset()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_bmc_call_warm_reset_finish() to get the result of the operation.
  *
  * See control_bmc_call_warm_reset_sync() for the synchronous, blocking version of this method.
@@ -13814,7 +14818,7 @@
 /**
  * control_bmc_call_warm_reset_sync:
  * @proxy: A #ControlBmcProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Bmc.warmReset">warmReset()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -13857,7 +14861,7 @@
  */
 void
 control_bmc_complete_cold_reset (
-    ControlBmc *object,
+    ControlBmc *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -13875,7 +14879,7 @@
  */
 void
 control_bmc_complete_warm_reset (
-    ControlBmc *object,
+    ControlBmc *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -13907,11 +14911,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlBmcProxy, control_bmc_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ControlBmcProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlBmcProxy, control_bmc_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_proxy_iface_init))
 
 #endif
 static void
@@ -13923,17 +14927,17 @@
 }
 
 static void
-control_bmc_proxy_get_property (GObject      *object,
-  guint         prop_id,
-  GValue       *value,
+control_bmc_proxy_get_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  GValue       *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
 
 static void
-control_bmc_proxy_set_property (GObject      *object,
-  guint         prop_id,
-  const GValue *value,
+control_bmc_proxy_set_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  const GValue *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
@@ -13948,8 +14952,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_control_bmc_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -14041,7 +15045,7 @@
 }
 
 static void
-control_bmc_proxy_iface_init (ControlBmcIface *iface)
+control_bmc_proxy_iface_init (ControlBmcIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -14049,15 +15053,15 @@
  * control_bmc_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Bmc.top_of_page">org.openbmc.control.Bmc</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_bmc_proxy_new_finish() to get the result of the operation.
  *
  * See control_bmc_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -14104,9 +15108,9 @@
  * control_bmc_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Bmc.top_of_page">org.openbmc.control.Bmc</link>. See g_dbus_proxy_new_sync() for more details.
@@ -14141,13 +15145,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like control_bmc_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_bmc_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See control_bmc_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -14196,7 +15200,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like control_bmc_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -14265,9 +15269,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -14433,7 +15437,7 @@
 }
 
 static void
-control_bmc_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+control_bmc_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
 {
 }
 
@@ -14441,11 +15445,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlBmcSkeleton, control_bmc_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ControlBmcSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlBmcSkeleton, control_bmc_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_BMC, control_bmc_skeleton_iface_init))
 
 #endif
 static void
@@ -14494,7 +15498,7 @@
 }
 
 static void
-control_bmc_skeleton_iface_init (ControlBmcIface *iface)
+control_bmc_skeleton_iface_init (ControlBmcIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -14524,6 +15528,13 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-control-Host.top_of_page">org.openbmc.control.Host</link> D-Bus interface in C.
  */
 
+enum
+{
+  _CONTROL_HOST_BOOTED,
+};
+
+static unsigned _CONTROL_HOST_SIGNALS[1] = { 0 };
+
 /* ---- Introspection data for org.openbmc.control.Host ---- */
 
 static const _ExtendedGDBusMethodInfo _control_host_method_info_boot =
@@ -14565,11 +15576,11 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _control_host_method_info_pointers[] =
+static const GDBusMethodInfo * const _control_host_method_info_pointers[] =
 {
-  &_control_host_method_info_boot,
-  &_control_host_method_info_shutdown,
-  &_control_host_method_info_reboot,
+  &_control_host_method_info_boot.parent_struct,
+  &_control_host_method_info_shutdown.parent_struct,
+  &_control_host_method_info_reboot.parent_struct,
   NULL
 };
 
@@ -14584,9 +15595,9 @@
   "booted"
 };
 
-static const _ExtendedGDBusSignalInfo * const _control_host_signal_info_pointers[] =
+static const GDBusSignalInfo * const _control_host_signal_info_pointers[] =
 {
-  &_control_host_signal_info_booted,
+  &_control_host_signal_info_booted.parent_struct,
   NULL
 };
 
@@ -14600,7 +15611,8 @@
     NULL
   },
   "debug-mode",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _control_host_property_info_flash_side =
@@ -14613,13 +15625,14 @@
     NULL
   },
   "flash-side",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _control_host_property_info_pointers[] =
+static const GDBusPropertyInfo * const _control_host_property_info_pointers[] =
 {
-  &_control_host_property_info_debug_mode,
-  &_control_host_property_info_flash_side,
+  &_control_host_property_info_debug_mode.parent_struct,
+  &_control_host_property_info_flash_side.parent_struct,
   NULL
 };
 
@@ -14652,7 +15665,7 @@
 
 /**
  * control_host_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #ControlHost interface for a concrete class.
@@ -14669,6 +15682,58 @@
 }
 
 
+inline static void
+control_host_signal_marshal_booted (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_host_method_marshal_boot (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_host_method_marshal_shutdown (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_host_method_marshal_reboot (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * ControlHost:
@@ -14690,7 +15755,7 @@
  */
 
 typedef ControlHostIface ControlHostInterface;
-G_DEFINE_INTERFACE (ControlHost, control_host, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (ControlHost, control_host, G_TYPE_OBJECT)
 
 static void
 control_host_default_init (ControlHostIface *iface)
@@ -14703,9 +15768,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Host.boot">boot()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_host_complete_boot() 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.
+   * 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 control_host_complete_boot() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-boot",
     G_TYPE_FROM_INTERFACE (iface),
@@ -14713,7 +15778,7 @@
     G_STRUCT_OFFSET (ControlHostIface, handle_boot),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_host_method_marshal_boot,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -14725,9 +15790,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Host.shutdown">shutdown()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_host_complete_shutdown() 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.
+   * 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 control_host_complete_shutdown() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-shutdown",
     G_TYPE_FROM_INTERFACE (iface),
@@ -14735,7 +15800,7 @@
     G_STRUCT_OFFSET (ControlHostIface, handle_shutdown),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_host_method_marshal_shutdown,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -14747,9 +15812,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Host.reboot">reboot()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_host_complete_reboot() 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.
+   * 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 control_host_complete_reboot() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-reboot",
     G_TYPE_FROM_INTERFACE (iface),
@@ -14757,7 +15822,7 @@
     G_STRUCT_OFFSET (ControlHostIface, handle_reboot),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_host_method_marshal_reboot,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -14771,15 +15836,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("booted",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ControlHostIface, booted),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _CONTROL_HOST_SIGNALS[_CONTROL_HOST_BOOTED] =
+    g_signal_new ("booted",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ControlHostIface, booted),
+      NULL,
+      NULL,
+      control_host_signal_marshal_booted,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -14815,6 +15881,8 @@
 gint 
 control_host_get_debug_mode (ControlHost *object)
 {
+  g_return_val_if_fail (IS_CONTROL_HOST (object), 0);
+
   return CONTROL_HOST_GET_IFACE (object)->get_debug_mode (object);
 }
 
@@ -14841,13 +15909,15 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 control_host_dup_flash_side() if on another thread.</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 control_host_dup_flash_side() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 control_host_get_flash_side (ControlHost *object)
 {
+  g_return_val_if_fail (IS_CONTROL_HOST (object), NULL);
+
   return CONTROL_HOST_GET_IFACE (object)->get_flash_side (object);
 }
 
@@ -14859,7 +15929,7 @@
  *
  * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 control_host_dup_flash_side (ControlHost *object)
@@ -14894,18 +15964,18 @@
 control_host_emit_booted (
     ControlHost *object)
 {
-  g_signal_emit_by_name (object, "booted");
+  g_signal_emit (object, _CONTROL_HOST_SIGNALS[_CONTROL_HOST_BOOTED], 0);
 }
 
 /**
  * control_host_call_boot:
  * @proxy: A #ControlHostProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Host.boot">boot()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_host_call_boot_finish() to get the result of the operation.
  *
  * See control_host_call_boot_sync() for the synchronous, blocking version of this method.
@@ -14957,7 +16027,7 @@
 /**
  * control_host_call_boot_sync:
  * @proxy: A #ControlHostProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Host.boot">boot()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -14992,12 +16062,12 @@
 /**
  * control_host_call_shutdown:
  * @proxy: A #ControlHostProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Host.shutdown">shutdown()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_host_call_shutdown_finish() to get the result of the operation.
  *
  * See control_host_call_shutdown_sync() for the synchronous, blocking version of this method.
@@ -15049,7 +16119,7 @@
 /**
  * control_host_call_shutdown_sync:
  * @proxy: A #ControlHostProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Host.shutdown">shutdown()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -15084,12 +16154,12 @@
 /**
  * control_host_call_reboot:
  * @proxy: A #ControlHostProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Host.reboot">reboot()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_host_call_reboot_finish() to get the result of the operation.
  *
  * See control_host_call_reboot_sync() for the synchronous, blocking version of this method.
@@ -15141,7 +16211,7 @@
 /**
  * control_host_call_reboot_sync:
  * @proxy: A #ControlHostProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Host.reboot">reboot()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -15184,7 +16254,7 @@
  */
 void
 control_host_complete_boot (
-    ControlHost *object,
+    ControlHost *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -15202,7 +16272,7 @@
  */
 void
 control_host_complete_shutdown (
-    ControlHost *object,
+    ControlHost *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -15220,7 +16290,7 @@
  */
 void
 control_host_complete_reboot (
-    ControlHost *object,
+    ControlHost *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -15252,11 +16322,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlHostProxy, control_host_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ControlHostProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlHostProxy, control_host_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_proxy_iface_init))
 
 #endif
 static void
@@ -15276,7 +16346,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _control_host_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _control_host_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -15323,7 +16393,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _control_host_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _control_host_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -15344,8 +16414,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_control_host_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -15479,15 +16549,15 @@
  * control_host_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Host.top_of_page">org.openbmc.control.Host</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_host_proxy_new_finish() to get the result of the operation.
  *
  * See control_host_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -15534,9 +16604,9 @@
  * control_host_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Host.top_of_page">org.openbmc.control.Host</link>. See g_dbus_proxy_new_sync() for more details.
@@ -15571,13 +16641,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like control_host_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_host_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See control_host_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -15626,7 +16696,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like control_host_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -15695,9 +16765,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -15909,11 +16979,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlHostSkeleton, control_host_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ControlHostSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlHostSkeleton, control_host_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_HOST, control_host_skeleton_iface_init))
 
 #endif
 static void
@@ -16056,14 +17126,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   ControlHostSkeleton *skeleton = CONTROL_HOST_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _control_host_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _control_host_schedule_emit_changed (skeleton, _control_host_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _control_host_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -16093,7 +17166,7 @@
   ControlHostSkeleton *skeleton = CONTROL_HOST_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -16104,7 +17177,7 @@
   ControlHostSkeleton *skeleton = CONTROL_HOST_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -16169,6 +17242,14 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-control-Power.top_of_page">org.openbmc.control.Power</link> D-Bus interface in C.
  */
 
+enum
+{
+  _CONTROL_POWER_POWER_GOOD,
+  _CONTROL_POWER_POWER_LOST,
+};
+
+static unsigned _CONTROL_POWER_SIGNALS[2] = { 0 };
+
 /* ---- Introspection data for org.openbmc.control.Power ---- */
 
 static const _ExtendedGDBusArgInfo _control_power_method_info_set_power_state_IN_ARG_state =
@@ -16182,9 +17263,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _control_power_method_info_set_power_state_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _control_power_method_info_set_power_state_IN_ARG_pointers[] =
 {
-  &_control_power_method_info_set_power_state_IN_ARG_state,
+  &_control_power_method_info_set_power_state_IN_ARG_state.parent_struct,
   NULL
 };
 
@@ -16212,9 +17293,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _control_power_method_info_get_power_state_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _control_power_method_info_get_power_state_OUT_ARG_pointers[] =
 {
-  &_control_power_method_info_get_power_state_OUT_ARG_state,
+  &_control_power_method_info_get_power_state_OUT_ARG_state.parent_struct,
   NULL
 };
 
@@ -16231,10 +17312,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _control_power_method_info_pointers[] =
+static const GDBusMethodInfo * const _control_power_method_info_pointers[] =
 {
-  &_control_power_method_info_set_power_state,
-  &_control_power_method_info_get_power_state,
+  &_control_power_method_info_set_power_state.parent_struct,
+  &_control_power_method_info_get_power_state.parent_struct,
   NULL
 };
 
@@ -16260,10 +17341,10 @@
   "power-lost"
 };
 
-static const _ExtendedGDBusSignalInfo * const _control_power_signal_info_pointers[] =
+static const GDBusSignalInfo * const _control_power_signal_info_pointers[] =
 {
-  &_control_power_signal_info_power_good,
-  &_control_power_signal_info_power_lost,
+  &_control_power_signal_info_power_good.parent_struct,
+  &_control_power_signal_info_power_lost.parent_struct,
   NULL
 };
 
@@ -16277,7 +17358,8 @@
     NULL
   },
   "pgood",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _control_power_property_info_state =
@@ -16290,7 +17372,8 @@
     NULL
   },
   "state",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _control_power_property_info_pgood_timeout =
@@ -16303,14 +17386,15 @@
     NULL
   },
   "pgood-timeout",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _control_power_property_info_pointers[] =
+static const GDBusPropertyInfo * const _control_power_property_info_pointers[] =
 {
-  &_control_power_property_info_pgood,
-  &_control_power_property_info_state,
-  &_control_power_property_info_pgood_timeout,
+  &_control_power_property_info_pgood.parent_struct,
+  &_control_power_property_info_state.parent_struct,
+  &_control_power_property_info_pgood_timeout.parent_struct,
   NULL
 };
 
@@ -16343,7 +17427,7 @@
 
 /**
  * control_power_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #ControlPower interface for a concrete class.
@@ -16361,6 +17445,58 @@
 }
 
 
+inline static void
+control_power_signal_marshal_power_good (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_power_signal_marshal_power_lost (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_power_method_marshal_set_power_state (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_INT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+control_power_method_marshal_get_power_state (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * ControlPower:
@@ -16383,7 +17519,7 @@
  */
 
 typedef ControlPowerIface ControlPowerInterface;
-G_DEFINE_INTERFACE (ControlPower, control_power, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (ControlPower, control_power, G_TYPE_OBJECT)
 
 static void
 control_power_default_init (ControlPowerIface *iface)
@@ -16397,9 +17533,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Power.setPowerState">setPowerState()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_power_complete_set_power_state() 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.
+   * 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 control_power_complete_set_power_state() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-power-state",
     G_TYPE_FROM_INTERFACE (iface),
@@ -16407,7 +17543,7 @@
     G_STRUCT_OFFSET (ControlPowerIface, handle_set_power_state),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_power_method_marshal_set_power_state,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
@@ -16419,9 +17555,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-control-Power.getPowerState">getPowerState()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call control_power_complete_get_power_state() 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.
+   * 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 control_power_complete_get_power_state() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-get-power-state",
     G_TYPE_FROM_INTERFACE (iface),
@@ -16429,7 +17565,7 @@
     G_STRUCT_OFFSET (ControlPowerIface, handle_get_power_state),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      control_power_method_marshal_get_power_state,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -16443,15 +17579,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("power-good",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ControlPowerIface, power_good),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _CONTROL_POWER_SIGNALS[_CONTROL_POWER_POWER_GOOD] =
+    g_signal_new ("power-good",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ControlPowerIface, power_good),
+      NULL,
+      NULL,
+      control_power_signal_marshal_power_good,
+      G_TYPE_NONE,
+      0);
 
   /**
    * ControlPower::power-lost:
@@ -16461,15 +17598,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("power-lost",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ControlPowerIface, power_lost),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _CONTROL_POWER_SIGNALS[_CONTROL_POWER_POWER_LOST] =
+    g_signal_new ("power-lost",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ControlPowerIface, power_lost),
+      NULL,
+      NULL,
+      control_power_signal_marshal_power_lost,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -16514,6 +17652,8 @@
 gint 
 control_power_get_pgood (ControlPower *object)
 {
+  g_return_val_if_fail (IS_CONTROL_POWER (object), 0);
+
   return CONTROL_POWER_GET_IFACE (object)->get_pgood (object);
 }
 
@@ -16545,6 +17685,8 @@
 gint 
 control_power_get_state (ControlPower *object)
 {
+  g_return_val_if_fail (IS_CONTROL_POWER (object), 0);
+
   return CONTROL_POWER_GET_IFACE (object)->get_state (object);
 }
 
@@ -16576,6 +17718,8 @@
 gint 
 control_power_get_pgood_timeout (ControlPower *object)
 {
+  g_return_val_if_fail (IS_CONTROL_POWER (object), 0);
+
   return CONTROL_POWER_GET_IFACE (object)->get_pgood_timeout (object);
 }
 
@@ -16604,7 +17748,7 @@
 control_power_emit_power_good (
     ControlPower *object)
 {
-  g_signal_emit_by_name (object, "power-good");
+  g_signal_emit (object, _CONTROL_POWER_SIGNALS[_CONTROL_POWER_POWER_GOOD], 0);
 }
 
 /**
@@ -16617,19 +17761,19 @@
 control_power_emit_power_lost (
     ControlPower *object)
 {
-  g_signal_emit_by_name (object, "power-lost");
+  g_signal_emit (object, _CONTROL_POWER_SIGNALS[_CONTROL_POWER_POWER_LOST], 0);
 }
 
 /**
  * control_power_call_set_power_state:
  * @proxy: A #ControlPowerProxy.
  * @arg_state: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Power.setPowerState">setPowerState()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_power_call_set_power_state_finish() to get the result of the operation.
  *
  * See control_power_call_set_power_state_sync() for the synchronous, blocking version of this method.
@@ -16684,7 +17828,7 @@
  * control_power_call_set_power_state_sync:
  * @proxy: A #ControlPowerProxy.
  * @arg_state: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Power.setPowerState">setPowerState()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -16721,12 +17865,12 @@
 /**
  * control_power_call_get_power_state:
  * @proxy: A #ControlPowerProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Power.getPowerState">getPowerState()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_power_call_get_power_state_finish() to get the result of the operation.
  *
  * See control_power_call_get_power_state_sync() for the synchronous, blocking version of this method.
@@ -16751,7 +17895,7 @@
 /**
  * control_power_call_get_power_state_finish:
  * @proxy: A #ControlPowerProxy.
- * @out_state: (out): Return location for return parameter or %NULL to ignore.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to control_power_call_get_power_state().
  * @error: Return location for error or %NULL.
  *
@@ -16781,8 +17925,8 @@
 /**
  * control_power_call_get_power_state_sync:
  * @proxy: A #ControlPowerProxy.
- * @out_state: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-control-Power.getPowerState">getPowerState()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -16827,7 +17971,7 @@
  */
 void
 control_power_complete_set_power_state (
-    ControlPower *object,
+    ControlPower *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -16846,7 +17990,7 @@
  */
 void
 control_power_complete_get_power_state (
-    ControlPower *object,
+    ControlPower *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     gint state)
 {
@@ -16880,11 +18024,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlPowerProxy, control_power_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ControlPowerProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlPowerProxy, control_power_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_proxy_iface_init))
 
 #endif
 static void
@@ -16904,7 +18048,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _control_power_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _control_power_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -16951,7 +18095,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _control_power_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _control_power_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -16972,8 +18116,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_control_power_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -17123,15 +18267,15 @@
  * control_power_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Power.top_of_page">org.openbmc.control.Power</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_power_proxy_new_finish() to get the result of the operation.
  *
  * See control_power_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -17178,9 +18322,9 @@
  * control_power_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Power.top_of_page">org.openbmc.control.Power</link>. See g_dbus_proxy_new_sync() for more details.
@@ -17215,13 +18359,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like control_power_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_power_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See control_power_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -17270,7 +18414,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like control_power_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -17339,9 +18483,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -17575,11 +18719,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlPowerSkeleton, control_power_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ControlPowerSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlPowerSkeleton, control_power_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_POWER, control_power_skeleton_iface_init))
 
 #endif
 static void
@@ -17722,14 +18866,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   ControlPowerSkeleton *skeleton = CONTROL_POWER_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 3);
+  info = (const _ExtendedGDBusPropertyInfo *) _control_power_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _control_power_schedule_emit_changed (skeleton, _control_power_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _control_power_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -17760,7 +18907,7 @@
   ControlPowerSkeleton *skeleton = CONTROL_POWER_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -17771,7 +18918,7 @@
   ControlPowerSkeleton *skeleton = CONTROL_POWER_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -17782,7 +18929,7 @@
   ControlPowerSkeleton *skeleton = CONTROL_POWER_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -17880,7 +19027,7 @@
 
 /**
  * control_checkstop_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #ControlCheckstop interface for a concrete class.
@@ -17889,7 +19036,7 @@
  * Returns: The last property id.
  */
 guint
-control_checkstop_override_properties (GObjectClass *klass, guint property_id_begin)
+control_checkstop_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
 {
   return property_id_begin - 1;
 }
@@ -17910,10 +19057,10 @@
  */
 
 typedef ControlCheckstopIface ControlCheckstopInterface;
-G_DEFINE_INTERFACE (ControlCheckstop, control_checkstop, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (ControlCheckstop, control_checkstop, G_TYPE_OBJECT)
 
 static void
-control_checkstop_default_init (ControlCheckstopIface *iface)
+control_checkstop_default_init (ControlCheckstopIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -17942,11 +19089,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlCheckstopProxy, control_checkstop_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ControlCheckstopProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlCheckstopProxy, control_checkstop_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_proxy_iface_init))
 
 #endif
 static void
@@ -17958,17 +19105,17 @@
 }
 
 static void
-control_checkstop_proxy_get_property (GObject      *object,
-  guint         prop_id,
-  GValue       *value,
+control_checkstop_proxy_get_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  GValue       *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
 
 static void
-control_checkstop_proxy_set_property (GObject      *object,
-  guint         prop_id,
-  const GValue *value,
+control_checkstop_proxy_set_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  const GValue *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
@@ -17983,8 +19130,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_control_checkstop_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -18076,7 +19223,7 @@
 }
 
 static void
-control_checkstop_proxy_iface_init (ControlCheckstopIface *iface)
+control_checkstop_proxy_iface_init (ControlCheckstopIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -18084,15 +19231,15 @@
  * control_checkstop_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Checkstop.top_of_page">org.openbmc.control.Checkstop</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_checkstop_proxy_new_finish() to get the result of the operation.
  *
  * See control_checkstop_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -18139,9 +19286,9 @@
  * control_checkstop_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Checkstop.top_of_page">org.openbmc.control.Checkstop</link>. See g_dbus_proxy_new_sync() for more details.
@@ -18176,13 +19323,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like control_checkstop_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call control_checkstop_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See control_checkstop_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -18231,7 +19378,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like control_checkstop_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -18300,9 +19447,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -18468,7 +19615,7 @@
 }
 
 static void
-control_checkstop_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+control_checkstop_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
 {
 }
 
@@ -18476,11 +19623,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ControlCheckstopSkeleton, control_checkstop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ControlCheckstopSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ControlCheckstopSkeleton, control_checkstop_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_CONTROL_CHECKSTOP, control_checkstop_skeleton_iface_init))
 
 #endif
 static void
@@ -18529,7 +19676,7 @@
 }
 
 static void
-control_checkstop_skeleton_iface_init (ControlCheckstopIface *iface)
+control_checkstop_skeleton_iface_init (ControlCheckstopIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -18559,6 +19706,13 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-Watchdog.top_of_page">org.openbmc.Watchdog</link> D-Bus interface in C.
  */
 
+enum
+{
+  _WATCHDOG_WATCHDOG_ERROR,
+};
+
+static unsigned _WATCHDOG_SIGNALS[1] = { 0 };
+
 /* ---- Introspection data for org.openbmc.Watchdog ---- */
 
 static const _ExtendedGDBusMethodInfo _watchdog_method_info_start =
@@ -18611,9 +19765,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _watchdog_method_info_set_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _watchdog_method_info_set_IN_ARG_pointers[] =
 {
-  &_watchdog_method_info_set_IN_ARG_interval,
+  &_watchdog_method_info_set_IN_ARG_interval.parent_struct,
   NULL
 };
 
@@ -18630,12 +19784,12 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _watchdog_method_info_pointers[] =
+static const GDBusMethodInfo * const _watchdog_method_info_pointers[] =
 {
-  &_watchdog_method_info_start,
-  &_watchdog_method_info_poke,
-  &_watchdog_method_info_stop,
-  &_watchdog_method_info_set,
+  &_watchdog_method_info_start.parent_struct,
+  &_watchdog_method_info_poke.parent_struct,
+  &_watchdog_method_info_stop.parent_struct,
+  &_watchdog_method_info_set.parent_struct,
   NULL
 };
 
@@ -18650,9 +19804,9 @@
   "watchdog-error"
 };
 
-static const _ExtendedGDBusSignalInfo * const _watchdog_signal_info_pointers[] =
+static const GDBusSignalInfo * const _watchdog_signal_info_pointers[] =
 {
-  &_watchdog_signal_info_watchdog_error,
+  &_watchdog_signal_info_watchdog_error.parent_struct,
   NULL
 };
 
@@ -18666,7 +19820,8 @@
     NULL
   },
   "watchdog",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _watchdog_property_info_poll_interval =
@@ -18679,13 +19834,14 @@
     NULL
   },
   "poll-interval",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _watchdog_property_info_pointers[] =
+static const GDBusPropertyInfo * const _watchdog_property_info_pointers[] =
 {
-  &_watchdog_property_info_watchdog,
-  &_watchdog_property_info_poll_interval,
+  &_watchdog_property_info_watchdog.parent_struct,
+  &_watchdog_property_info_poll_interval.parent_struct,
   NULL
 };
 
@@ -18718,7 +19874,7 @@
 
 /**
  * watchdog_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Watchdog interface for a concrete class.
@@ -18735,6 +19891,71 @@
 }
 
 
+inline static void
+watchdog_signal_marshal_watchdog_error (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+watchdog_method_marshal_start (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+watchdog_method_marshal_poke (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+watchdog_method_marshal_stop (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+watchdog_method_marshal_set (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_INT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Watchdog:
@@ -18757,7 +19978,7 @@
  */
 
 typedef WatchdogIface WatchdogInterface;
-G_DEFINE_INTERFACE (Watchdog, watchdog, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Watchdog, watchdog, G_TYPE_OBJECT)
 
 static void
 watchdog_default_init (WatchdogIface *iface)
@@ -18770,9 +19991,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Watchdog.start">start()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call watchdog_complete_start() 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.
+   * 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 watchdog_complete_start() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-start",
     G_TYPE_FROM_INTERFACE (iface),
@@ -18780,7 +20001,7 @@
     G_STRUCT_OFFSET (WatchdogIface, handle_start),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      watchdog_method_marshal_start,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -18792,9 +20013,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Watchdog.poke">poke()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call watchdog_complete_poke() 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.
+   * 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 watchdog_complete_poke() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-poke",
     G_TYPE_FROM_INTERFACE (iface),
@@ -18802,7 +20023,7 @@
     G_STRUCT_OFFSET (WatchdogIface, handle_poke),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      watchdog_method_marshal_poke,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -18814,9 +20035,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Watchdog.stop">stop()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call watchdog_complete_stop() 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.
+   * 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 watchdog_complete_stop() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-stop",
     G_TYPE_FROM_INTERFACE (iface),
@@ -18824,7 +20045,7 @@
     G_STRUCT_OFFSET (WatchdogIface, handle_stop),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      watchdog_method_marshal_stop,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -18837,9 +20058,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Watchdog.set">set()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call watchdog_complete_set() 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.
+   * 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 watchdog_complete_set() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set",
     G_TYPE_FROM_INTERFACE (iface),
@@ -18847,7 +20068,7 @@
     G_STRUCT_OFFSET (WatchdogIface, handle_set),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      watchdog_method_marshal_set,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
@@ -18861,15 +20082,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("watchdog-error",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (WatchdogIface, watchdog_error),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _WATCHDOG_SIGNALS[_WATCHDOG_WATCHDOG_ERROR] =
+    g_signal_new ("watchdog-error",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (WatchdogIface, watchdog_error),
+      NULL,
+      NULL,
+      watchdog_signal_marshal_watchdog_error,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -18905,6 +20127,8 @@
 gint 
 watchdog_get_watchdog (Watchdog *object)
 {
+  g_return_val_if_fail (IS_WATCHDOG (object), 0);
+
   return WATCHDOG_GET_IFACE (object)->get_watchdog (object);
 }
 
@@ -18936,6 +20160,8 @@
 gint 
 watchdog_get_poll_interval (Watchdog *object)
 {
+  g_return_val_if_fail (IS_WATCHDOG (object), 0);
+
   return WATCHDOG_GET_IFACE (object)->get_poll_interval (object);
 }
 
@@ -18964,18 +20190,18 @@
 watchdog_emit_watchdog_error (
     Watchdog *object)
 {
-  g_signal_emit_by_name (object, "watchdog-error");
+  g_signal_emit (object, _WATCHDOG_SIGNALS[_WATCHDOG_WATCHDOG_ERROR], 0);
 }
 
 /**
  * watchdog_call_start:
  * @proxy: A #WatchdogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.start">start()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call watchdog_call_start_finish() to get the result of the operation.
  *
  * See watchdog_call_start_sync() for the synchronous, blocking version of this method.
@@ -19027,7 +20253,7 @@
 /**
  * watchdog_call_start_sync:
  * @proxy: A #WatchdogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.start">start()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -19062,12 +20288,12 @@
 /**
  * watchdog_call_poke:
  * @proxy: A #WatchdogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.poke">poke()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call watchdog_call_poke_finish() to get the result of the operation.
  *
  * See watchdog_call_poke_sync() for the synchronous, blocking version of this method.
@@ -19119,7 +20345,7 @@
 /**
  * watchdog_call_poke_sync:
  * @proxy: A #WatchdogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.poke">poke()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -19154,12 +20380,12 @@
 /**
  * watchdog_call_stop:
  * @proxy: A #WatchdogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.stop">stop()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call watchdog_call_stop_finish() to get the result of the operation.
  *
  * See watchdog_call_stop_sync() for the synchronous, blocking version of this method.
@@ -19211,7 +20437,7 @@
 /**
  * watchdog_call_stop_sync:
  * @proxy: A #WatchdogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.stop">stop()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -19247,12 +20473,12 @@
  * watchdog_call_set:
  * @proxy: A #WatchdogProxy.
  * @arg_interval: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.set">set()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call watchdog_call_set_finish() to get the result of the operation.
  *
  * See watchdog_call_set_sync() for the synchronous, blocking version of this method.
@@ -19307,7 +20533,7 @@
  * watchdog_call_set_sync:
  * @proxy: A #WatchdogProxy.
  * @arg_interval: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Watchdog.set">set()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -19352,7 +20578,7 @@
  */
 void
 watchdog_complete_start (
-    Watchdog *object,
+    Watchdog *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -19370,7 +20596,7 @@
  */
 void
 watchdog_complete_poke (
-    Watchdog *object,
+    Watchdog *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -19388,7 +20614,7 @@
  */
 void
 watchdog_complete_stop (
-    Watchdog *object,
+    Watchdog *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -19406,7 +20632,7 @@
  */
 void
 watchdog_complete_set (
-    Watchdog *object,
+    Watchdog *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -19438,11 +20664,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (WatchdogProxy, watchdog_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (WatchdogProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (WatchdogProxy, watchdog_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_proxy_iface_init))
 
 #endif
 static void
@@ -19462,7 +20688,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _watchdog_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _watchdog_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -19509,7 +20735,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _watchdog_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _watchdog_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -19530,8 +20756,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_watchdog_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -19665,15 +20891,15 @@
  * watchdog_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Watchdog.top_of_page">org.openbmc.Watchdog</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call watchdog_proxy_new_finish() to get the result of the operation.
  *
  * See watchdog_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -19720,9 +20946,9 @@
  * watchdog_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Watchdog.top_of_page">org.openbmc.Watchdog</link>. See g_dbus_proxy_new_sync() for more details.
@@ -19757,13 +20983,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like watchdog_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call watchdog_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See watchdog_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -19812,7 +21038,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like watchdog_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -19881,9 +21107,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -20095,11 +21321,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (WatchdogSkeleton, watchdog_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (WatchdogSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (WatchdogSkeleton, watchdog_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_WATCHDOG, watchdog_skeleton_iface_init))
 
 #endif
 static void
@@ -20242,14 +21468,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   WatchdogSkeleton *skeleton = WATCHDOG_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _watchdog_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _watchdog_schedule_emit_changed (skeleton, _watchdog_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _watchdog_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -20279,7 +21508,7 @@
   WatchdogSkeleton *skeleton = WATCHDOG_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -20290,7 +21519,7 @@
   WatchdogSkeleton *skeleton = WATCHDOG_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -20355,6 +21584,13 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-EventLog.top_of_page">org.openbmc.EventLog</link> D-Bus interface in C.
  */
 
+enum
+{
+  _EVENT_LOG_EVENT_LOG,
+};
+
+static unsigned _EVENT_LOG_SIGNALS[1] = { 0 };
+
 /* ---- Introspection data for org.openbmc.EventLog ---- */
 
 static const _ExtendedGDBusArgInfo _event_log_method_info_get_event_log_OUT_ARG_log =
@@ -20368,9 +21604,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _event_log_method_info_get_event_log_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _event_log_method_info_get_event_log_OUT_ARG_pointers[] =
 {
-  &_event_log_method_info_get_event_log_OUT_ARG_log,
+  &_event_log_method_info_get_event_log_OUT_ARG_log.parent_struct,
   NULL
 };
 
@@ -20387,9 +21623,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _event_log_method_info_pointers[] =
+static const GDBusMethodInfo * const _event_log_method_info_pointers[] =
 {
-  &_event_log_method_info_get_event_log,
+  &_event_log_method_info_get_event_log.parent_struct,
   NULL
 };
 
@@ -20426,11 +21662,11 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _event_log_signal_info_event_log_ARG_pointers[] =
+static const GDBusArgInfo * const _event_log_signal_info_event_log_ARG_pointers[] =
 {
-  &_event_log_signal_info_event_log_ARG_priority,
-  &_event_log_signal_info_event_log_ARG_message,
-  &_event_log_signal_info_event_log_ARG_rc,
+  &_event_log_signal_info_event_log_ARG_priority.parent_struct,
+  &_event_log_signal_info_event_log_ARG_message.parent_struct,
+  &_event_log_signal_info_event_log_ARG_rc.parent_struct,
   NULL
 };
 
@@ -20445,9 +21681,9 @@
   "event-log"
 };
 
-static const _ExtendedGDBusSignalInfo * const _event_log_signal_info_pointers[] =
+static const GDBusSignalInfo * const _event_log_signal_info_pointers[] =
 {
-  &_event_log_signal_info_event_log,
+  &_event_log_signal_info_event_log.parent_struct,
   NULL
 };
 
@@ -20480,7 +21716,7 @@
 
 /**
  * event_log_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #EventLog interface for a concrete class.
@@ -20489,12 +21725,38 @@
  * Returns: The last property id.
  */
 guint
-event_log_override_properties (GObjectClass *klass, guint property_id_begin)
+event_log_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
 {
   return property_id_begin - 1;
 }
 
 
+inline static void
+event_log_signal_marshal_event_log (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_VOID__INT_STRING_INT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+event_log_method_marshal_get_event_log (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * EventLog:
@@ -20512,7 +21774,7 @@
  */
 
 typedef EventLogIface EventLogInterface;
-G_DEFINE_INTERFACE (EventLog, event_log, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (EventLog, event_log, G_TYPE_OBJECT)
 
 static void
 event_log_default_init (EventLogIface *iface)
@@ -20525,9 +21787,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-EventLog.getEventLog">getEventLog()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call event_log_complete_get_event_log() 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.
+   * 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 event_log_complete_get_event_log() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-get-event-log",
     G_TYPE_FROM_INTERFACE (iface),
@@ -20535,7 +21797,7 @@
     G_STRUCT_OFFSET (EventLogIface, handle_get_event_log),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      event_log_method_marshal_get_event_log,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -20552,15 +21814,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("event-log",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (EventLogIface, event_log),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT);
+  _EVENT_LOG_SIGNALS[_EVENT_LOG_EVENT_LOG] =
+    g_signal_new ("event-log",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (EventLogIface, event_log),
+      NULL,
+      NULL,
+      event_log_signal_marshal_event_log,
+      G_TYPE_NONE,
+      3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT);
 
 }
 
@@ -20580,18 +21843,18 @@
     const gchar *arg_message,
     gint arg_rc)
 {
-  g_signal_emit_by_name (object, "event-log", arg_priority, arg_message, arg_rc);
+  g_signal_emit (object, _EVENT_LOG_SIGNALS[_EVENT_LOG_EVENT_LOG], 0, arg_priority, arg_message, arg_rc);
 }
 
 /**
  * event_log_call_get_event_log:
  * @proxy: A #EventLogProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-EventLog.getEventLog">getEventLog()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call event_log_call_get_event_log_finish() to get the result of the operation.
  *
  * See event_log_call_get_event_log_sync() for the synchronous, blocking version of this method.
@@ -20616,7 +21879,7 @@
 /**
  * event_log_call_get_event_log_finish:
  * @proxy: A #EventLogProxy.
- * @out_log: (out): Return location for return parameter or %NULL to ignore.
+ * @out_log: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to event_log_call_get_event_log().
  * @error: Return location for error or %NULL.
  *
@@ -20646,8 +21909,8 @@
 /**
  * event_log_call_get_event_log_sync:
  * @proxy: A #EventLogProxy.
- * @out_log: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_log: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-EventLog.getEventLog">getEventLog()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -20693,7 +21956,7 @@
  */
 void
 event_log_complete_get_event_log (
-    EventLog *object,
+    EventLog *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     GVariant *log)
 {
@@ -20727,11 +21990,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (EventLogProxy, event_log_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (EventLogProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (EventLogProxy, event_log_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_proxy_iface_init))
 
 #endif
 static void
@@ -20743,17 +22006,17 @@
 }
 
 static void
-event_log_proxy_get_property (GObject      *object,
-  guint         prop_id,
-  GValue       *value,
+event_log_proxy_get_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  GValue       *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
 
 static void
-event_log_proxy_set_property (GObject      *object,
-  guint         prop_id,
-  const GValue *value,
+event_log_proxy_set_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  const GValue *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
@@ -20768,8 +22031,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_event_log_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -20861,7 +22124,7 @@
 }
 
 static void
-event_log_proxy_iface_init (EventLogIface *iface)
+event_log_proxy_iface_init (EventLogIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -20869,15 +22132,15 @@
  * event_log_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-EventLog.top_of_page">org.openbmc.EventLog</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call event_log_proxy_new_finish() to get the result of the operation.
  *
  * See event_log_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -20924,9 +22187,9 @@
  * event_log_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-EventLog.top_of_page">org.openbmc.EventLog</link>. See g_dbus_proxy_new_sync() for more details.
@@ -20961,13 +22224,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like event_log_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call event_log_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See event_log_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -21016,7 +22279,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like event_log_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -21085,9 +22348,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -21253,7 +22516,7 @@
 }
 
 static void
-event_log_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+event_log_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
 {
 }
 
@@ -21289,11 +22552,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (EventLogSkeleton, event_log_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (EventLogSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (EventLogSkeleton, event_log_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_EVENT_LOG, event_log_skeleton_iface_init))
 
 #endif
 static void
@@ -21373,6 +22636,14 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-Flash.top_of_page">org.openbmc.Flash</link> D-Bus interface in C.
  */
 
+enum
+{
+  _FLASH_UPDATED,
+  _FLASH_DOWNLOAD,
+};
+
+static unsigned _FLASH_SIGNALS[2] = { 0 };
+
 /* ---- Introspection data for org.openbmc.Flash ---- */
 
 static const _ExtendedGDBusArgInfo _flash_method_info_update_IN_ARG_filename =
@@ -21386,9 +22657,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_method_info_update_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_method_info_update_IN_ARG_pointers[] =
 {
-  &_flash_method_info_update_IN_ARG_filename,
+  &_flash_method_info_update_IN_ARG_filename.parent_struct,
   NULL
 };
 
@@ -21416,9 +22687,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_method_info_error_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_method_info_error_IN_ARG_pointers[] =
 {
-  &_flash_method_info_error_IN_ARG_message,
+  &_flash_method_info_error_IN_ARG_message.parent_struct,
   NULL
 };
 
@@ -21470,10 +22741,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_method_info_update_via_tftp_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_method_info_update_via_tftp_IN_ARG_pointers[] =
 {
-  &_flash_method_info_update_via_tftp_IN_ARG_url,
-  &_flash_method_info_update_via_tftp_IN_ARG_filename,
+  &_flash_method_info_update_via_tftp_IN_ARG_url.parent_struct,
+  &_flash_method_info_update_via_tftp_IN_ARG_filename.parent_struct,
   NULL
 };
 
@@ -21503,13 +22774,13 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _flash_method_info_pointers[] =
+static const GDBusMethodInfo * const _flash_method_info_pointers[] =
 {
-  &_flash_method_info_update,
-  &_flash_method_info_error,
-  &_flash_method_info_done,
-  &_flash_method_info_update_via_tftp,
-  &_flash_method_info_init,
+  &_flash_method_info_update.parent_struct,
+  &_flash_method_info_error.parent_struct,
+  &_flash_method_info_done.parent_struct,
+  &_flash_method_info_update_via_tftp.parent_struct,
+  &_flash_method_info_init.parent_struct,
   NULL
 };
 
@@ -21546,10 +22817,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_signal_info_download_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_signal_info_download_ARG_pointers[] =
 {
-  &_flash_signal_info_download_ARG_url,
-  &_flash_signal_info_download_ARG_filename,
+  &_flash_signal_info_download_ARG_url.parent_struct,
+  &_flash_signal_info_download_ARG_filename.parent_struct,
   NULL
 };
 
@@ -21564,10 +22835,10 @@
   "download"
 };
 
-static const _ExtendedGDBusSignalInfo * const _flash_signal_info_pointers[] =
+static const GDBusSignalInfo * const _flash_signal_info_pointers[] =
 {
-  &_flash_signal_info_updated,
-  &_flash_signal_info_download,
+  &_flash_signal_info_updated.parent_struct,
+  &_flash_signal_info_download.parent_struct,
   NULL
 };
 
@@ -21581,7 +22852,8 @@
     NULL
   },
   "filename",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _flash_property_info_flasher_path =
@@ -21594,7 +22866,8 @@
     NULL
   },
   "flasher-path",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _flash_property_info_flasher_name =
@@ -21607,7 +22880,8 @@
     NULL
   },
   "flasher-name",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _flash_property_info_flasher_instance =
@@ -21620,7 +22894,8 @@
     NULL
   },
   "flasher-instance",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _flash_property_info_status =
@@ -21633,16 +22908,17 @@
     NULL
   },
   "status",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _flash_property_info_pointers[] =
+static const GDBusPropertyInfo * const _flash_property_info_pointers[] =
 {
-  &_flash_property_info_filename,
-  &_flash_property_info_flasher_path,
-  &_flash_property_info_flasher_name,
-  &_flash_property_info_flasher_instance,
-  &_flash_property_info_status,
+  &_flash_property_info_filename.parent_struct,
+  &_flash_property_info_flasher_path.parent_struct,
+  &_flash_property_info_flasher_name.parent_struct,
+  &_flash_property_info_flasher_instance.parent_struct,
+  &_flash_property_info_status.parent_struct,
   NULL
 };
 
@@ -21675,7 +22951,7 @@
 
 /**
  * flash_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Flash interface for a concrete class.
@@ -21695,6 +22971,97 @@
 }
 
 
+inline static void
+flash_signal_marshal_updated (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_signal_marshal_download (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_VOID__STRING_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_method_marshal_update (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_method_marshal_error (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_method_marshal_done (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_method_marshal_update_via_tftp (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_method_marshal_init (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Flash:
@@ -21722,7 +23089,7 @@
  */
 
 typedef FlashIface FlashInterface;
-G_DEFINE_INTERFACE (Flash, flash, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Flash, flash, G_TYPE_OBJECT)
 
 static void
 flash_default_init (FlashIface *iface)
@@ -21736,9 +23103,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Flash.update">update()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call flash_complete_update() 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.
+   * 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 flash_complete_update() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-update",
     G_TYPE_FROM_INTERFACE (iface),
@@ -21746,7 +23113,7 @@
     G_STRUCT_OFFSET (FlashIface, handle_update),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      flash_method_marshal_update,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
@@ -21759,9 +23126,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Flash.error">error()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call flash_complete_error() 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.
+   * 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 flash_complete_error() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-error",
     G_TYPE_FROM_INTERFACE (iface),
@@ -21769,7 +23136,7 @@
     G_STRUCT_OFFSET (FlashIface, handle_error),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      flash_method_marshal_error,
     G_TYPE_BOOLEAN,
     2,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
@@ -21781,9 +23148,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Flash.done">done()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call flash_complete_done() 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.
+   * 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 flash_complete_done() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-done",
     G_TYPE_FROM_INTERFACE (iface),
@@ -21791,7 +23158,7 @@
     G_STRUCT_OFFSET (FlashIface, handle_done),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      flash_method_marshal_done,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -21805,9 +23172,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Flash.updateViaTftp">updateViaTftp()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call flash_complete_update_via_tftp() 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.
+   * 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 flash_complete_update_via_tftp() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-update-via-tftp",
     G_TYPE_FROM_INTERFACE (iface),
@@ -21815,7 +23182,7 @@
     G_STRUCT_OFFSET (FlashIface, handle_update_via_tftp),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      flash_method_marshal_update_via_tftp,
     G_TYPE_BOOLEAN,
     3,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);
@@ -21827,9 +23194,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Flash.init">init()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call flash_complete_init() 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.
+   * 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 flash_complete_init() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-init",
     G_TYPE_FROM_INTERFACE (iface),
@@ -21837,7 +23204,7 @@
     G_STRUCT_OFFSET (FlashIface, handle_init),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      flash_method_marshal_init,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -21851,15 +23218,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("updated",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FlashIface, updated),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _FLASH_SIGNALS[_FLASH_UPDATED] =
+    g_signal_new ("updated",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FlashIface, updated),
+      NULL,
+      NULL,
+      flash_signal_marshal_updated,
+      G_TYPE_NONE,
+      0);
 
   /**
    * Flash::download:
@@ -21871,15 +23239,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("download",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FlashIface, download),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    2, G_TYPE_STRING, G_TYPE_STRING);
+  _FLASH_SIGNALS[_FLASH_DOWNLOAD] =
+    g_signal_new ("download",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FlashIface, download),
+      NULL,
+      NULL,
+      flash_signal_marshal_download,
+      G_TYPE_NONE,
+      2, G_TYPE_STRING, G_TYPE_STRING);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -21937,13 +23306,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_dup_filename() if on another thread.</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 flash_dup_filename() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_get_filename (Flash *object)
 {
+  g_return_val_if_fail (IS_FLASH (object), NULL);
+
   return FLASH_GET_IFACE (object)->get_filename (object);
 }
 
@@ -21955,7 +23326,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_dup_filename (Flash *object)
@@ -21988,13 +23359,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_dup_flasher_path() if on another thread.</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 flash_dup_flasher_path() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_get_flasher_path (Flash *object)
 {
+  g_return_val_if_fail (IS_FLASH (object), NULL);
+
   return FLASH_GET_IFACE (object)->get_flasher_path (object);
 }
 
@@ -22006,7 +23379,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_dup_flasher_path (Flash *object)
@@ -22039,13 +23412,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_dup_flasher_name() if on another thread.</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 flash_dup_flasher_name() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_get_flasher_name (Flash *object)
 {
+  g_return_val_if_fail (IS_FLASH (object), NULL);
+
   return FLASH_GET_IFACE (object)->get_flasher_name (object);
 }
 
@@ -22057,7 +23432,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_dup_flasher_name (Flash *object)
@@ -22090,13 +23465,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_dup_flasher_instance() if on another thread.</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 flash_dup_flasher_instance() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_get_flasher_instance (Flash *object)
 {
+  g_return_val_if_fail (IS_FLASH (object), NULL);
+
   return FLASH_GET_IFACE (object)->get_flasher_instance (object);
 }
 
@@ -22108,7 +23485,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_dup_flasher_instance (Flash *object)
@@ -22141,13 +23518,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_dup_status() if on another thread.</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 flash_dup_status() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_get_status (Flash *object)
 {
+  g_return_val_if_fail (IS_FLASH (object), NULL);
+
   return FLASH_GET_IFACE (object)->get_status (object);
 }
 
@@ -22159,7 +23538,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_dup_status (Flash *object)
@@ -22194,7 +23573,7 @@
 flash_emit_updated (
     Flash *object)
 {
-  g_signal_emit_by_name (object, "updated");
+  g_signal_emit (object, _FLASH_SIGNALS[_FLASH_UPDATED], 0);
 }
 
 /**
@@ -22211,19 +23590,19 @@
     const gchar *arg_url,
     const gchar *arg_filename)
 {
-  g_signal_emit_by_name (object, "download", arg_url, arg_filename);
+  g_signal_emit (object, _FLASH_SIGNALS[_FLASH_DOWNLOAD], 0, arg_url, arg_filename);
 }
 
 /**
  * flash_call_update:
  * @proxy: A #FlashProxy.
  * @arg_filename: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.update">update()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_call_update_finish() to get the result of the operation.
  *
  * See flash_call_update_sync() for the synchronous, blocking version of this method.
@@ -22278,7 +23657,7 @@
  * flash_call_update_sync:
  * @proxy: A #FlashProxy.
  * @arg_filename: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.update">update()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -22316,12 +23695,12 @@
  * flash_call_error:
  * @proxy: A #FlashProxy.
  * @arg_message: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.error">error()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_call_error_finish() to get the result of the operation.
  *
  * See flash_call_error_sync() for the synchronous, blocking version of this method.
@@ -22376,7 +23755,7 @@
  * flash_call_error_sync:
  * @proxy: A #FlashProxy.
  * @arg_message: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.error">error()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -22413,12 +23792,12 @@
 /**
  * flash_call_done:
  * @proxy: A #FlashProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.done">done()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_call_done_finish() to get the result of the operation.
  *
  * See flash_call_done_sync() for the synchronous, blocking version of this method.
@@ -22470,7 +23849,7 @@
 /**
  * flash_call_done_sync:
  * @proxy: A #FlashProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.done">done()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -22507,12 +23886,12 @@
  * @proxy: A #FlashProxy.
  * @arg_url: Argument to pass with the method invocation.
  * @arg_filename: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.updateViaTftp">updateViaTftp()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_call_update_via_tftp_finish() to get the result of the operation.
  *
  * See flash_call_update_via_tftp_sync() for the synchronous, blocking version of this method.
@@ -22570,7 +23949,7 @@
  * @proxy: A #FlashProxy.
  * @arg_url: Argument to pass with the method invocation.
  * @arg_filename: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.updateViaTftp">updateViaTftp()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -22609,12 +23988,12 @@
 /**
  * flash_call_init:
  * @proxy: A #FlashProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.init">init()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_call_init_finish() to get the result of the operation.
  *
  * See flash_call_init_sync() for the synchronous, blocking version of this method.
@@ -22666,7 +24045,7 @@
 /**
  * flash_call_init_sync:
  * @proxy: A #FlashProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Flash.init">init()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -22709,7 +24088,7 @@
  */
 void
 flash_complete_update (
-    Flash *object,
+    Flash *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -22727,7 +24106,7 @@
  */
 void
 flash_complete_error (
-    Flash *object,
+    Flash *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -22745,7 +24124,7 @@
  */
 void
 flash_complete_done (
-    Flash *object,
+    Flash *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -22763,7 +24142,7 @@
  */
 void
 flash_complete_update_via_tftp (
-    Flash *object,
+    Flash *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -22781,7 +24160,7 @@
  */
 void
 flash_complete_init (
-    Flash *object,
+    Flash *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -22813,11 +24192,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (FlashProxy, flash_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (FlashProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (FlashProxy, flash_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_proxy_iface_init))
 
 #endif
 static void
@@ -22837,7 +24216,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 5);
-  info = _flash_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _flash_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -22884,7 +24263,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 5);
-  info = _flash_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _flash_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -22905,8 +24284,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_flash_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -23088,15 +24467,15 @@
  * flash_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Flash.top_of_page">org.openbmc.Flash</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_proxy_new_finish() to get the result of the operation.
  *
  * See flash_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -23143,9 +24522,9 @@
  * flash_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Flash.top_of_page">org.openbmc.Flash</link>. See g_dbus_proxy_new_sync() for more details.
@@ -23180,13 +24559,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like flash_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See flash_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -23235,7 +24614,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like flash_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -23304,9 +24683,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -23544,11 +24923,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (FlashSkeleton, flash_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (FlashSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (FlashSkeleton, flash_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH, flash_skeleton_iface_init))
 
 #endif
 static void
@@ -23691,14 +25070,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   FlashSkeleton *skeleton = FLASH_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 5);
+  info = (const _ExtendedGDBusPropertyInfo *) _flash_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _flash_schedule_emit_changed (skeleton, _flash_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _flash_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -23731,7 +25113,7 @@
   FlashSkeleton *skeleton = FLASH_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -23742,7 +25124,7 @@
   FlashSkeleton *skeleton = FLASH_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -23753,7 +25135,7 @@
   FlashSkeleton *skeleton = FLASH_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -23764,7 +25146,7 @@
   FlashSkeleton *skeleton = FLASH_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[3]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[3]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -23775,7 +25157,7 @@
   FlashSkeleton *skeleton = FLASH_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[4]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[4]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -23844,6 +25226,15 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-FlashControl.top_of_page">org.openbmc.FlashControl</link> D-Bus interface in C.
  */
 
+enum
+{
+  _FLASH_CONTROL_DONE,
+  _FLASH_CONTROL_ERROR,
+  _FLASH_CONTROL_PROGRESS,
+};
+
+static unsigned _FLASH_CONTROL_SIGNALS[3] = { 0 };
+
 /* ---- Introspection data for org.openbmc.FlashControl ---- */
 
 static const _ExtendedGDBusArgInfo _flash_control_method_info_flash_IN_ARG_type =
@@ -23868,10 +25259,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_control_method_info_flash_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_control_method_info_flash_IN_ARG_pointers[] =
 {
-  &_flash_control_method_info_flash_IN_ARG_type,
-  &_flash_control_method_info_flash_IN_ARG_filename,
+  &_flash_control_method_info_flash_IN_ARG_type.parent_struct,
+  &_flash_control_method_info_flash_IN_ARG_filename.parent_struct,
   NULL
 };
 
@@ -23888,9 +25279,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _flash_control_method_info_pointers[] =
+static const GDBusMethodInfo * const _flash_control_method_info_pointers[] =
 {
-  &_flash_control_method_info_flash,
+  &_flash_control_method_info_flash.parent_struct,
   NULL
 };
 
@@ -23905,9 +25296,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_control_signal_info_done_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_control_signal_info_done_ARG_pointers[] =
 {
-  &_flash_control_signal_info_done_ARG_filename,
+  &_flash_control_signal_info_done_ARG_filename.parent_struct,
   NULL
 };
 
@@ -23933,9 +25324,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_control_signal_info_error_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_control_signal_info_error_ARG_pointers[] =
 {
-  &_flash_control_signal_info_error_ARG_filename,
+  &_flash_control_signal_info_error_ARG_filename.parent_struct,
   NULL
 };
 
@@ -23972,10 +25363,10 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _flash_control_signal_info_progress_ARG_pointers[] =
+static const GDBusArgInfo * const _flash_control_signal_info_progress_ARG_pointers[] =
 {
-  &_flash_control_signal_info_progress_ARG_filename,
-  &_flash_control_signal_info_progress_ARG_progress,
+  &_flash_control_signal_info_progress_ARG_filename.parent_struct,
+  &_flash_control_signal_info_progress_ARG_progress.parent_struct,
   NULL
 };
 
@@ -23990,11 +25381,11 @@
   "progress"
 };
 
-static const _ExtendedGDBusSignalInfo * const _flash_control_signal_info_pointers[] =
+static const GDBusSignalInfo * const _flash_control_signal_info_pointers[] =
 {
-  &_flash_control_signal_info_done,
-  &_flash_control_signal_info_error,
-  &_flash_control_signal_info_progress,
+  &_flash_control_signal_info_done.parent_struct,
+  &_flash_control_signal_info_error.parent_struct,
+  &_flash_control_signal_info_progress.parent_struct,
   NULL
 };
 
@@ -24008,7 +25399,8 @@
     NULL
   },
   "filename",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _flash_control_property_info_type_ =
@@ -24021,13 +25413,14 @@
     NULL
   },
   "type",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _flash_control_property_info_pointers[] =
+static const GDBusPropertyInfo * const _flash_control_property_info_pointers[] =
 {
-  &_flash_control_property_info_filename,
-  &_flash_control_property_info_type_,
+  &_flash_control_property_info_filename.parent_struct,
+  &_flash_control_property_info_type_.parent_struct,
   NULL
 };
 
@@ -24060,7 +25453,7 @@
 
 /**
  * flash_control_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #FlashControl interface for a concrete class.
@@ -24077,6 +25470,58 @@
 }
 
 
+inline static void
+flash_control_signal_marshal_done (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_control_signal_marshal_error (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_control_signal_marshal_progress (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_VOID__STRING_UCHAR (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+flash_control_method_marshal_flash (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_STRING_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * FlashControl:
@@ -24098,7 +25543,7 @@
  */
 
 typedef FlashControlIface FlashControlInterface;
-G_DEFINE_INTERFACE (FlashControl, flash_control, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (FlashControl, flash_control, G_TYPE_OBJECT)
 
 static void
 flash_control_default_init (FlashControlIface *iface)
@@ -24113,9 +25558,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-FlashControl.flash">flash()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call flash_control_complete_flash() 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.
+   * 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 flash_control_complete_flash() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-flash",
     G_TYPE_FROM_INTERFACE (iface),
@@ -24123,7 +25568,7 @@
     G_STRUCT_OFFSET (FlashControlIface, handle_flash),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      flash_control_method_marshal_flash,
     G_TYPE_BOOLEAN,
     3,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);
@@ -24138,15 +25583,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("done",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FlashControlIface, done),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    1, G_TYPE_STRING);
+  _FLASH_CONTROL_SIGNALS[_FLASH_CONTROL_DONE] =
+    g_signal_new ("done",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FlashControlIface, done),
+      NULL,
+      NULL,
+      flash_control_signal_marshal_done,
+      G_TYPE_NONE,
+      1, G_TYPE_STRING);
 
   /**
    * FlashControl::error:
@@ -24157,15 +25603,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("error",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FlashControlIface, error),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    1, G_TYPE_STRING);
+  _FLASH_CONTROL_SIGNALS[_FLASH_CONTROL_ERROR] =
+    g_signal_new ("error",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FlashControlIface, error),
+      NULL,
+      NULL,
+      flash_control_signal_marshal_error,
+      G_TYPE_NONE,
+      1, G_TYPE_STRING);
 
   /**
    * FlashControl::progress:
@@ -24177,15 +25624,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("progress",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (FlashControlIface, progress),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    2, G_TYPE_STRING, G_TYPE_UCHAR);
+  _FLASH_CONTROL_SIGNALS[_FLASH_CONTROL_PROGRESS] =
+    g_signal_new ("progress",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (FlashControlIface, progress),
+      NULL,
+      NULL,
+      flash_control_signal_marshal_progress,
+      G_TYPE_NONE,
+      2, G_TYPE_STRING, G_TYPE_UCHAR);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -24216,13 +25664,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_control_dup_filename() if on another thread.</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 flash_control_dup_filename() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_control_get_filename (FlashControl *object)
 {
+  g_return_val_if_fail (IS_FLASH_CONTROL (object), NULL);
+
   return FLASH_CONTROL_GET_IFACE (object)->get_filename (object);
 }
 
@@ -24234,7 +25684,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_control_dup_filename (FlashControl *object)
@@ -24267,13 +25717,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 flash_control_dup_type_() if on another thread.</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 flash_control_dup_type_() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 flash_control_get_type_ (FlashControl *object)
 {
+  g_return_val_if_fail (IS_FLASH_CONTROL (object), NULL);
+
   return FLASH_CONTROL_GET_IFACE (object)->get_type_ (object);
 }
 
@@ -24285,7 +25737,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 flash_control_dup_type_ (FlashControl *object)
@@ -24322,7 +25774,7 @@
     FlashControl *object,
     const gchar *arg_filename)
 {
-  g_signal_emit_by_name (object, "done", arg_filename);
+  g_signal_emit (object, _FLASH_CONTROL_SIGNALS[_FLASH_CONTROL_DONE], 0, arg_filename);
 }
 
 /**
@@ -24337,7 +25789,7 @@
     FlashControl *object,
     const gchar *arg_filename)
 {
-  g_signal_emit_by_name (object, "error", arg_filename);
+  g_signal_emit (object, _FLASH_CONTROL_SIGNALS[_FLASH_CONTROL_ERROR], 0, arg_filename);
 }
 
 /**
@@ -24354,7 +25806,7 @@
     const gchar *arg_filename,
     guchar arg_progress)
 {
-  g_signal_emit_by_name (object, "progress", arg_filename, arg_progress);
+  g_signal_emit (object, _FLASH_CONTROL_SIGNALS[_FLASH_CONTROL_PROGRESS], 0, arg_filename, arg_progress);
 }
 
 /**
@@ -24362,12 +25814,12 @@
  * @proxy: A #FlashControlProxy.
  * @arg_type: Argument to pass with the method invocation.
  * @arg_filename: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-FlashControl.flash">flash()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_control_call_flash_finish() to get the result of the operation.
  *
  * See flash_control_call_flash_sync() for the synchronous, blocking version of this method.
@@ -24425,7 +25877,7 @@
  * @proxy: A #FlashControlProxy.
  * @arg_type: Argument to pass with the method invocation.
  * @arg_filename: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-FlashControl.flash">flash()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -24472,7 +25924,7 @@
  */
 void
 flash_control_complete_flash (
-    FlashControl *object,
+    FlashControl *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -24504,11 +25956,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (FlashControlProxy, flash_control_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (FlashControlProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (FlashControlProxy, flash_control_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_proxy_iface_init))
 
 #endif
 static void
@@ -24528,7 +25980,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _flash_control_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _flash_control_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -24575,7 +26027,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _flash_control_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _flash_control_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -24596,8 +26048,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_flash_control_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -24731,15 +26183,15 @@
  * flash_control_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-FlashControl.top_of_page">org.openbmc.FlashControl</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_control_proxy_new_finish() to get the result of the operation.
  *
  * See flash_control_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -24786,9 +26238,9 @@
  * flash_control_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-FlashControl.top_of_page">org.openbmc.FlashControl</link>. See g_dbus_proxy_new_sync() for more details.
@@ -24823,13 +26275,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like flash_control_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call flash_control_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See flash_control_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -24878,7 +26330,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like flash_control_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -24947,9 +26399,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -25213,11 +26665,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (FlashControlSkeleton, flash_control_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (FlashControlSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (FlashControlSkeleton, flash_control_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_FLASH_CONTROL, flash_control_skeleton_iface_init))
 
 #endif
 static void
@@ -25360,14 +26812,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   FlashControlSkeleton *skeleton = FLASH_CONTROL_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _flash_control_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _flash_control_schedule_emit_changed (skeleton, _flash_control_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _flash_control_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -25397,7 +26852,7 @@
   FlashControlSkeleton *skeleton = FLASH_CONTROL_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -25408,7 +26863,7 @@
   FlashControlSkeleton *skeleton = FLASH_CONTROL_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -25475,6 +26930,15 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-Button.top_of_page">org.openbmc.Button</link> D-Bus interface in C.
  */
 
+enum
+{
+  _BUTTON_RELEASED,
+  _BUTTON_PRESSED,
+  _BUTTON_PRESSED_LONG,
+};
+
+static unsigned _BUTTON_SIGNALS[3] = { 0 };
+
 /* ---- Introspection data for org.openbmc.Button ---- */
 
 static const _ExtendedGDBusArgInfo _button_method_info_is_on_OUT_ARG_state =
@@ -25488,9 +26952,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _button_method_info_is_on_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _button_method_info_is_on_OUT_ARG_pointers[] =
 {
-  &_button_method_info_is_on_OUT_ARG_state,
+  &_button_method_info_is_on_OUT_ARG_state.parent_struct,
   NULL
 };
 
@@ -25533,11 +26997,11 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _button_method_info_pointers[] =
+static const GDBusMethodInfo * const _button_method_info_pointers[] =
 {
-  &_button_method_info_is_on,
-  &_button_method_info_sim_press,
-  &_button_method_info_sim_long_press,
+  &_button_method_info_is_on.parent_struct,
+  &_button_method_info_sim_press.parent_struct,
+  &_button_method_info_sim_long_press.parent_struct,
   NULL
 };
 
@@ -25574,11 +27038,11 @@
   "pressed-long"
 };
 
-static const _ExtendedGDBusSignalInfo * const _button_signal_info_pointers[] =
+static const GDBusSignalInfo * const _button_signal_info_pointers[] =
 {
-  &_button_signal_info_released,
-  &_button_signal_info_pressed,
-  &_button_signal_info_pressed_long,
+  &_button_signal_info_released.parent_struct,
+  &_button_signal_info_pressed.parent_struct,
+  &_button_signal_info_pressed_long.parent_struct,
   NULL
 };
 
@@ -25592,7 +27056,8 @@
     NULL
   },
   "state",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _button_property_info_timer =
@@ -25605,13 +27070,14 @@
     NULL
   },
   "timer",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _button_property_info_pointers[] =
+static const GDBusPropertyInfo * const _button_property_info_pointers[] =
 {
-  &_button_property_info_state,
-  &_button_property_info_timer,
+  &_button_property_info_state.parent_struct,
+  &_button_property_info_timer.parent_struct,
   NULL
 };
 
@@ -25644,7 +27110,7 @@
 
 /**
  * button_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Button interface for a concrete class.
@@ -25661,6 +27127,84 @@
 }
 
 
+inline static void
+button_signal_marshal_released (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+button_signal_marshal_pressed (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+button_signal_marshal_pressed_long (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  g_cclosure_marshal_VOID__VOID (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+button_method_marshal_is_on (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+button_method_marshal_sim_press (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+button_method_marshal_sim_long_press (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Button:
@@ -25684,7 +27228,7 @@
  */
 
 typedef ButtonIface ButtonInterface;
-G_DEFINE_INTERFACE (Button, button, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Button, button, G_TYPE_OBJECT)
 
 static void
 button_default_init (ButtonIface *iface)
@@ -25697,9 +27241,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Button.isOn">isOn()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call button_complete_is_on() 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.
+   * 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 button_complete_is_on() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-is-on",
     G_TYPE_FROM_INTERFACE (iface),
@@ -25707,7 +27251,7 @@
     G_STRUCT_OFFSET (ButtonIface, handle_is_on),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      button_method_marshal_is_on,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -25719,9 +27263,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Button.simPress">simPress()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call button_complete_sim_press() 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.
+   * 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 button_complete_sim_press() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-sim-press",
     G_TYPE_FROM_INTERFACE (iface),
@@ -25729,7 +27273,7 @@
     G_STRUCT_OFFSET (ButtonIface, handle_sim_press),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      button_method_marshal_sim_press,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -25741,9 +27285,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Button.simLongPress">simLongPress()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call button_complete_sim_long_press() 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.
+   * 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 button_complete_sim_long_press() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-sim-long-press",
     G_TYPE_FROM_INTERFACE (iface),
@@ -25751,7 +27295,7 @@
     G_STRUCT_OFFSET (ButtonIface, handle_sim_long_press),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      button_method_marshal_sim_long_press,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -25765,15 +27309,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("released",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ButtonIface, released),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _BUTTON_SIGNALS[_BUTTON_RELEASED] =
+    g_signal_new ("released",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ButtonIface, released),
+      NULL,
+      NULL,
+      button_signal_marshal_released,
+      G_TYPE_NONE,
+      0);
 
   /**
    * Button::pressed:
@@ -25783,15 +27328,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("pressed",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ButtonIface, pressed),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _BUTTON_SIGNALS[_BUTTON_PRESSED] =
+    g_signal_new ("pressed",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ButtonIface, pressed),
+      NULL,
+      NULL,
+      button_signal_marshal_pressed,
+      G_TYPE_NONE,
+      0);
 
   /**
    * Button::pressed-long:
@@ -25801,15 +27347,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("pressed-long",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (ButtonIface, pressed_long),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    0);
+  _BUTTON_SIGNALS[_BUTTON_PRESSED_LONG] =
+    g_signal_new ("pressed-long",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (ButtonIface, pressed_long),
+      NULL,
+      NULL,
+      button_signal_marshal_pressed_long,
+      G_TYPE_NONE,
+      0);
 
   /* GObject properties for D-Bus properties: */
   /**
@@ -25845,6 +27392,8 @@
 gboolean 
 button_get_state (Button *object)
 {
+  g_return_val_if_fail (IS_BUTTON (object), FALSE);
+
   return BUTTON_GET_IFACE (object)->get_state (object);
 }
 
@@ -25876,6 +27425,8 @@
 guint64 
 button_get_timer (Button *object)
 {
+  g_return_val_if_fail (IS_BUTTON (object), 0);
+
   return BUTTON_GET_IFACE (object)->get_timer (object);
 }
 
@@ -25904,7 +27455,7 @@
 button_emit_released (
     Button *object)
 {
-  g_signal_emit_by_name (object, "released");
+  g_signal_emit (object, _BUTTON_SIGNALS[_BUTTON_RELEASED], 0);
 }
 
 /**
@@ -25917,7 +27468,7 @@
 button_emit_pressed (
     Button *object)
 {
-  g_signal_emit_by_name (object, "pressed");
+  g_signal_emit (object, _BUTTON_SIGNALS[_BUTTON_PRESSED], 0);
 }
 
 /**
@@ -25930,18 +27481,18 @@
 button_emit_pressed_long (
     Button *object)
 {
-  g_signal_emit_by_name (object, "pressed-long");
+  g_signal_emit (object, _BUTTON_SIGNALS[_BUTTON_PRESSED_LONG], 0);
 }
 
 /**
  * button_call_is_on:
  * @proxy: A #ButtonProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Button.isOn">isOn()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call button_call_is_on_finish() to get the result of the operation.
  *
  * See button_call_is_on_sync() for the synchronous, blocking version of this method.
@@ -25966,7 +27517,7 @@
 /**
  * button_call_is_on_finish:
  * @proxy: A #ButtonProxy.
- * @out_state: (out): Return location for return parameter or %NULL to ignore.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to button_call_is_on().
  * @error: Return location for error or %NULL.
  *
@@ -25996,8 +27547,8 @@
 /**
  * button_call_is_on_sync:
  * @proxy: A #ButtonProxy.
- * @out_state: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Button.isOn">isOn()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -26034,12 +27585,12 @@
 /**
  * button_call_sim_press:
  * @proxy: A #ButtonProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Button.simPress">simPress()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call button_call_sim_press_finish() to get the result of the operation.
  *
  * See button_call_sim_press_sync() for the synchronous, blocking version of this method.
@@ -26091,7 +27642,7 @@
 /**
  * button_call_sim_press_sync:
  * @proxy: A #ButtonProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Button.simPress">simPress()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -26126,12 +27677,12 @@
 /**
  * button_call_sim_long_press:
  * @proxy: A #ButtonProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Button.simLongPress">simLongPress()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call button_call_sim_long_press_finish() to get the result of the operation.
  *
  * See button_call_sim_long_press_sync() for the synchronous, blocking version of this method.
@@ -26183,7 +27734,7 @@
 /**
  * button_call_sim_long_press_sync:
  * @proxy: A #ButtonProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Button.simLongPress">simLongPress()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -26227,7 +27778,7 @@
  */
 void
 button_complete_is_on (
-    Button *object,
+    Button *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     gboolean state)
 {
@@ -26247,7 +27798,7 @@
  */
 void
 button_complete_sim_press (
-    Button *object,
+    Button *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -26265,7 +27816,7 @@
  */
 void
 button_complete_sim_long_press (
-    Button *object,
+    Button *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -26297,11 +27848,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ButtonProxy, button_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (ButtonProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ButtonProxy, button_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_proxy_iface_init))
 
 #endif
 static void
@@ -26321,7 +27872,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _button_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _button_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -26368,7 +27919,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 2);
-  info = _button_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _button_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -26389,8 +27940,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_button_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -26454,7 +28005,7 @@
 {
   ButtonProxy *proxy = BUTTON_PROXY (object);
   GVariant *variant;
-  gboolean value = 0;
+  gboolean value = FALSE;
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "state");
   if (variant != NULL)
     {
@@ -26524,15 +28075,15 @@
  * button_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Button.top_of_page">org.openbmc.Button</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call button_proxy_new_finish() to get the result of the operation.
  *
  * See button_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -26579,9 +28130,9 @@
  * button_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Button.top_of_page">org.openbmc.Button</link>. See g_dbus_proxy_new_sync() for more details.
@@ -26616,13 +28167,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like button_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call button_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See button_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -26671,7 +28222,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like button_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -26740,9 +28291,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -26998,11 +28549,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (ButtonSkeleton, button_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (ButtonSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (ButtonSkeleton, button_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_BUTTON, button_skeleton_iface_init))
 
 #endif
 static void
@@ -27145,14 +28696,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   ButtonSkeleton *skeleton = BUTTON_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 2);
+  info = (const _ExtendedGDBusPropertyInfo *) _button_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _button_schedule_emit_changed (skeleton, _button_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _button_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -27182,7 +28736,7 @@
   ButtonSkeleton *skeleton = BUTTON_SKELETON (object);
   gboolean value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_boolean (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_boolean (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -27193,7 +28747,7 @@
   ButtonSkeleton *skeleton = BUTTON_SKELETON (object);
   guint64 value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_uint64 (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_uint64 (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -27314,12 +28868,12 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _led_method_info_pointers[] =
+static const GDBusMethodInfo * const _led_method_info_pointers[] =
 {
-  &_led_method_info_set_on,
-  &_led_method_info_set_off,
-  &_led_method_info_set_blink_slow,
-  &_led_method_info_set_blink_fast,
+  &_led_method_info_set_on.parent_struct,
+  &_led_method_info_set_off.parent_struct,
+  &_led_method_info_set_blink_slow.parent_struct,
+  &_led_method_info_set_blink_fast.parent_struct,
   NULL
 };
 
@@ -27333,7 +28887,8 @@
     NULL
   },
   "color",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _led_property_info_function =
@@ -27346,7 +28901,8 @@
     NULL
   },
   "function",
-  FALSE
+  FALSE,
+  TRUE
 };
 
 static const _ExtendedGDBusPropertyInfo _led_property_info_state =
@@ -27359,14 +28915,15 @@
     NULL
   },
   "state",
-  FALSE
+  FALSE,
+  TRUE
 };
 
-static const _ExtendedGDBusPropertyInfo * const _led_property_info_pointers[] =
+static const GDBusPropertyInfo * const _led_property_info_pointers[] =
 {
-  &_led_property_info_color,
-  &_led_property_info_function,
-  &_led_property_info_state,
+  &_led_property_info_color.parent_struct,
+  &_led_property_info_function.parent_struct,
+  &_led_property_info_state.parent_struct,
   NULL
 };
 
@@ -27399,7 +28956,7 @@
 
 /**
  * led_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #Led interface for a concrete class.
@@ -27417,6 +28974,58 @@
 }
 
 
+inline static void
+led_method_marshal_set_on (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+led_method_marshal_set_off (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+led_method_marshal_set_blink_slow (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+led_method_marshal_set_blink_fast (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * Led:
@@ -27439,7 +29048,7 @@
  */
 
 typedef LedIface LedInterface;
-G_DEFINE_INTERFACE (Led, led, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (Led, led, G_TYPE_OBJECT)
 
 static void
 led_default_init (LedIface *iface)
@@ -27452,9 +29061,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Led.setOn">setOn()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call led_complete_set_on() 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.
+   * 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 led_complete_set_on() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-on",
     G_TYPE_FROM_INTERFACE (iface),
@@ -27462,7 +29071,7 @@
     G_STRUCT_OFFSET (LedIface, handle_set_on),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      led_method_marshal_set_on,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -27474,9 +29083,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Led.setOff">setOff()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call led_complete_set_off() 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.
+   * 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 led_complete_set_off() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-off",
     G_TYPE_FROM_INTERFACE (iface),
@@ -27484,7 +29093,7 @@
     G_STRUCT_OFFSET (LedIface, handle_set_off),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      led_method_marshal_set_off,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -27496,9 +29105,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Led.setBlinkSlow">setBlinkSlow()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call led_complete_set_blink_slow() 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.
+   * 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 led_complete_set_blink_slow() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-blink-slow",
     G_TYPE_FROM_INTERFACE (iface),
@@ -27506,7 +29115,7 @@
     G_STRUCT_OFFSET (LedIface, handle_set_blink_slow),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      led_method_marshal_set_blink_slow,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -27518,9 +29127,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-Led.setBlinkFast">setBlinkFast()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call led_complete_set_blink_fast() 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.
+   * 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 led_complete_set_blink_fast() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-set-blink-fast",
     G_TYPE_FROM_INTERFACE (iface),
@@ -27528,7 +29137,7 @@
     G_STRUCT_OFFSET (LedIface, handle_set_blink_fast),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      led_method_marshal_set_blink_fast,
     G_TYPE_BOOLEAN,
     1,
     G_TYPE_DBUS_METHOD_INVOCATION);
@@ -27576,6 +29185,8 @@
 gint 
 led_get_color (Led *object)
 {
+  g_return_val_if_fail (IS_LED (object), 0);
+
   return LED_GET_IFACE (object)->get_color (object);
 }
 
@@ -27602,13 +29213,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 led_dup_function() if on another thread.</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 led_dup_function() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 led_get_function (Led *object)
 {
+  g_return_val_if_fail (IS_LED (object), NULL);
+
   return LED_GET_IFACE (object)->get_function (object);
 }
 
@@ -27620,7 +29233,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 led_dup_function (Led *object)
@@ -27653,13 +29266,15 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * <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 led_dup_state() if on another thread.</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 led_dup_state() if on another thread.
  *
- * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
+ * Returns: (transfer none) (nullable): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  */
 const gchar *
 led_get_state (Led *object)
 {
+  g_return_val_if_fail (IS_LED (object), NULL);
+
   return LED_GET_IFACE (object)->get_state (object);
 }
 
@@ -27671,7 +29286,7 @@
  *
  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  *
- * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
+ * Returns: (transfer full) (nullable): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  */
 gchar *
 led_dup_state (Led *object)
@@ -27699,12 +29314,12 @@
 /**
  * led_call_set_on:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setOn">setOn()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call led_call_set_on_finish() to get the result of the operation.
  *
  * See led_call_set_on_sync() for the synchronous, blocking version of this method.
@@ -27756,7 +29371,7 @@
 /**
  * led_call_set_on_sync:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setOn">setOn()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -27791,12 +29406,12 @@
 /**
  * led_call_set_off:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setOff">setOff()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call led_call_set_off_finish() to get the result of the operation.
  *
  * See led_call_set_off_sync() for the synchronous, blocking version of this method.
@@ -27848,7 +29463,7 @@
 /**
  * led_call_set_off_sync:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setOff">setOff()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -27883,12 +29498,12 @@
 /**
  * led_call_set_blink_slow:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setBlinkSlow">setBlinkSlow()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call led_call_set_blink_slow_finish() to get the result of the operation.
  *
  * See led_call_set_blink_slow_sync() for the synchronous, blocking version of this method.
@@ -27940,7 +29555,7 @@
 /**
  * led_call_set_blink_slow_sync:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setBlinkSlow">setBlinkSlow()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -27975,12 +29590,12 @@
 /**
  * led_call_set_blink_fast:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setBlinkFast">setBlinkFast()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call led_call_set_blink_fast_finish() to get the result of the operation.
  *
  * See led_call_set_blink_fast_sync() for the synchronous, blocking version of this method.
@@ -28032,7 +29647,7 @@
 /**
  * led_call_set_blink_fast_sync:
  * @proxy: A #LedProxy.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-Led.setBlinkFast">setBlinkFast()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -28075,7 +29690,7 @@
  */
 void
 led_complete_set_on (
-    Led *object,
+    Led *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -28093,7 +29708,7 @@
  */
 void
 led_complete_set_off (
-    Led *object,
+    Led *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -28111,7 +29726,7 @@
  */
 void
 led_complete_set_blink_slow (
-    Led *object,
+    Led *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -28129,7 +29744,7 @@
  */
 void
 led_complete_set_blink_fast (
-    Led *object,
+    Led *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation)
 {
   g_dbus_method_invocation_return_value (invocation,
@@ -28161,11 +29776,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (LedProxy, led_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (LedProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (LedProxy, led_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_proxy_iface_init))
 
 #endif
 static void
@@ -28185,7 +29800,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _led_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _led_property_info_pointers[prop_id - 1];
   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
   if (info->use_gvariant)
     {
@@ -28232,7 +29847,7 @@
   const _ExtendedGDBusPropertyInfo *info;
   GVariant *variant;
   g_assert (prop_id != 0 && prop_id - 1 < 3);
-  info = _led_property_info_pointers[prop_id - 1];
+  info = (const _ExtendedGDBusPropertyInfo *) _led_property_info_pointers[prop_id - 1];
   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
   g_dbus_proxy_call (G_DBUS_PROXY (object),
     "org.freedesktop.DBus.Properties.Set",
@@ -28253,8 +29868,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_led_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -28404,15 +30019,15 @@
  * led_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Led.top_of_page">org.openbmc.Led</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call led_proxy_new_finish() to get the result of the operation.
  *
  * See led_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -28459,9 +30074,9 @@
  * led_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Led.top_of_page">org.openbmc.Led</link>. See g_dbus_proxy_new_sync() for more details.
@@ -28496,13 +30111,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like led_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call led_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See led_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -28551,7 +30166,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like led_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -28620,9 +30235,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -28812,11 +30427,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (LedSkeleton, led_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (LedSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (LedSkeleton, led_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_LED, led_skeleton_iface_init))
 
 #endif
 static void
@@ -28959,14 +30574,17 @@
   const GValue *value,
   GParamSpec   *pspec)
 {
+  const _ExtendedGDBusPropertyInfo *info;
   LedSkeleton *skeleton = LED_SKELETON (object);
   g_assert (prop_id != 0 && prop_id - 1 < 3);
+  info = (const _ExtendedGDBusPropertyInfo *) _led_property_info_pointers[prop_id - 1];
   g_mutex_lock (&skeleton->priv->lock);
   g_object_freeze_notify (object);
   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
     {
-      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
-        _led_schedule_emit_changed (skeleton, _led_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
+      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL &&
+          info->emits_changed_signal)
+        _led_schedule_emit_changed (skeleton, info, prop_id, &skeleton->priv->properties[prop_id - 1]);
       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
       g_object_notify_by_pspec (object, pspec);
     }
@@ -28997,7 +30615,7 @@
   LedSkeleton *skeleton = LED_SKELETON (object);
   gint value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_int (&(skeleton->priv->properties[0]));
+  value = g_marshal_value_peek_int (&(skeleton->priv->properties[0]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -29008,7 +30626,7 @@
   LedSkeleton *skeleton = LED_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[1]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[1]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -29019,7 +30637,7 @@
   LedSkeleton *skeleton = LED_SKELETON (object);
   const gchar *value;
   g_mutex_lock (&skeleton->priv->lock);
-  value = g_value_get_string (&(skeleton->priv->properties[2]));
+  value = g_marshal_value_peek_string (&(skeleton->priv->properties[2]));
   g_mutex_unlock (&skeleton->priv->lock);
   return value;
 }
@@ -29084,6 +30702,13 @@
  * This section contains code for working with the <link linkend="gdbus-interface-org-openbmc-HostIpmi.top_of_page">org.openbmc.HostIpmi</link> D-Bus interface in C.
  */
 
+enum
+{
+  _HOST_IPMI_RECEIVED_MESSAGE,
+};
+
+static unsigned _HOST_IPMI_SIGNALS[1] = { 0 };
+
 /* ---- Introspection data for org.openbmc.HostIpmi ---- */
 
 static const _ExtendedGDBusArgInfo _host_ipmi_method_info_send_message_IN_ARG_seq =
@@ -29130,12 +30755,12 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _host_ipmi_method_info_send_message_IN_ARG_pointers[] =
+static const GDBusArgInfo * const _host_ipmi_method_info_send_message_IN_ARG_pointers[] =
 {
-  &_host_ipmi_method_info_send_message_IN_ARG_seq,
-  &_host_ipmi_method_info_send_message_IN_ARG_netfn,
-  &_host_ipmi_method_info_send_message_IN_ARG_cmd,
-  &_host_ipmi_method_info_send_message_IN_ARG_data,
+  &_host_ipmi_method_info_send_message_IN_ARG_seq.parent_struct,
+  &_host_ipmi_method_info_send_message_IN_ARG_netfn.parent_struct,
+  &_host_ipmi_method_info_send_message_IN_ARG_cmd.parent_struct,
+  &_host_ipmi_method_info_send_message_IN_ARG_data.parent_struct,
   NULL
 };
 
@@ -29150,9 +30775,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _host_ipmi_method_info_send_message_OUT_ARG_pointers[] =
+static const GDBusArgInfo * const _host_ipmi_method_info_send_message_OUT_ARG_pointers[] =
 {
-  &_host_ipmi_method_info_send_message_OUT_ARG_unnamed_arg4,
+  &_host_ipmi_method_info_send_message_OUT_ARG_unnamed_arg4.parent_struct,
   NULL
 };
 
@@ -29169,9 +30794,9 @@
   FALSE
 };
 
-static const _ExtendedGDBusMethodInfo * const _host_ipmi_method_info_pointers[] =
+static const GDBusMethodInfo * const _host_ipmi_method_info_pointers[] =
 {
-  &_host_ipmi_method_info_send_message,
+  &_host_ipmi_method_info_send_message.parent_struct,
   NULL
 };
 
@@ -29219,12 +30844,12 @@
   FALSE
 };
 
-static const _ExtendedGDBusArgInfo * const _host_ipmi_signal_info_received_message_ARG_pointers[] =
+static const GDBusArgInfo * const _host_ipmi_signal_info_received_message_ARG_pointers[] =
 {
-  &_host_ipmi_signal_info_received_message_ARG_seq,
-  &_host_ipmi_signal_info_received_message_ARG_netfn,
-  &_host_ipmi_signal_info_received_message_ARG_cmd,
-  &_host_ipmi_signal_info_received_message_ARG_data,
+  &_host_ipmi_signal_info_received_message_ARG_seq.parent_struct,
+  &_host_ipmi_signal_info_received_message_ARG_netfn.parent_struct,
+  &_host_ipmi_signal_info_received_message_ARG_cmd.parent_struct,
+  &_host_ipmi_signal_info_received_message_ARG_data.parent_struct,
   NULL
 };
 
@@ -29239,9 +30864,9 @@
   "received-message"
 };
 
-static const _ExtendedGDBusSignalInfo * const _host_ipmi_signal_info_pointers[] =
+static const GDBusSignalInfo * const _host_ipmi_signal_info_pointers[] =
 {
-  &_host_ipmi_signal_info_received_message,
+  &_host_ipmi_signal_info_received_message.parent_struct,
   NULL
 };
 
@@ -29274,7 +30899,7 @@
 
 /**
  * host_ipmi_override_properties:
- * @klass: The class structure for a #GObject<!-- -->-derived class.
+ * @klass: The class structure for a #GObject derived class.
  * @property_id_begin: The property id to assign to the first overridden property.
  *
  * Overrides all #GObject properties in the #HostIpmi interface for a concrete class.
@@ -29283,12 +30908,38 @@
  * Returns: The last property id.
  */
 guint
-host_ipmi_override_properties (GObjectClass *klass, guint property_id_begin)
+host_ipmi_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
 {
   return property_id_begin - 1;
 }
 
 
+inline static void
+host_ipmi_signal_marshal_received_message (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_VOID__UCHAR_UCHAR_UCHAR_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
+inline static void
+host_ipmi_method_marshal_send_message (
+    GClosure     *closure,
+    GValue       *return_value,
+    unsigned int  n_param_values,
+    const GValue *param_values,
+    void         *invocation_hint,
+    void         *marshal_data)
+{
+  _g_dbus_codegen_marshal_BOOLEAN__OBJECT_UCHAR_UCHAR_UCHAR_STRING (closure,
+    return_value, n_param_values, param_values, invocation_hint, marshal_data);
+}
+
 
 /**
  * HostIpmi:
@@ -29306,7 +30957,7 @@
  */
 
 typedef HostIpmiIface HostIpmiInterface;
-G_DEFINE_INTERFACE (HostIpmi, host_ipmi, G_TYPE_OBJECT);
+G_DEFINE_INTERFACE (HostIpmi, host_ipmi, G_TYPE_OBJECT)
 
 static void
 host_ipmi_default_init (HostIpmiIface *iface)
@@ -29323,9 +30974,9 @@
    *
    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-openbmc-HostIpmi.sendMessage">sendMessage()</link> D-Bus method.
    *
-   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call host_ipmi_complete_send_message() 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.
+   * 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 host_ipmi_complete_send_message() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
    *
-   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
    */
   g_signal_new ("handle-send-message",
     G_TYPE_FROM_INTERFACE (iface),
@@ -29333,7 +30984,7 @@
     G_STRUCT_OFFSET (HostIpmiIface, handle_send_message),
     g_signal_accumulator_true_handled,
     NULL,
-    g_cclosure_marshal_generic,
+      host_ipmi_method_marshal_send_message,
     G_TYPE_BOOLEAN,
     5,
     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UCHAR, G_TYPE_UCHAR, G_TYPE_UCHAR, G_TYPE_STRING);
@@ -29351,15 +31002,16 @@
    *
    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
    */
-  g_signal_new ("received-message",
-    G_TYPE_FROM_INTERFACE (iface),
-    G_SIGNAL_RUN_LAST,
-    G_STRUCT_OFFSET (HostIpmiIface, received_message),
-    NULL,
-    NULL,
-    g_cclosure_marshal_generic,
-    G_TYPE_NONE,
-    4, G_TYPE_UCHAR, G_TYPE_UCHAR, G_TYPE_UCHAR, G_TYPE_STRING);
+  _HOST_IPMI_SIGNALS[_HOST_IPMI_RECEIVED_MESSAGE] =
+    g_signal_new ("received-message",
+      G_TYPE_FROM_INTERFACE (iface),
+      G_SIGNAL_RUN_LAST,
+      G_STRUCT_OFFSET (HostIpmiIface, received_message),
+      NULL,
+      NULL,
+      host_ipmi_signal_marshal_received_message,
+      G_TYPE_NONE,
+      4, G_TYPE_UCHAR, G_TYPE_UCHAR, G_TYPE_UCHAR, G_TYPE_STRING);
 
 }
 
@@ -29381,7 +31033,7 @@
     guchar arg_cmd,
     const gchar *arg_data)
 {
-  g_signal_emit_by_name (object, "received-message", arg_seq, arg_netfn, arg_cmd, arg_data);
+  g_signal_emit (object, _HOST_IPMI_SIGNALS[_HOST_IPMI_RECEIVED_MESSAGE], 0, arg_seq, arg_netfn, arg_cmd, arg_data);
 }
 
 /**
@@ -29391,12 +31043,12 @@
  * @arg_netfn: Argument to pass with the method invocation.
  * @arg_cmd: Argument to pass with the method invocation.
  * @arg_data: Argument to pass with the method invocation.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously invokes the <link linkend="gdbus-method-org-openbmc-HostIpmi.sendMessage">sendMessage()</link> D-Bus method on @proxy.
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call host_ipmi_call_send_message_finish() to get the result of the operation.
  *
  * See host_ipmi_call_send_message_sync() for the synchronous, blocking version of this method.
@@ -29429,7 +31081,7 @@
 /**
  * host_ipmi_call_send_message_finish:
  * @proxy: A #HostIpmiProxy.
- * @out_unnamed_arg4: (out): Return location for return parameter or %NULL to ignore.
+ * @out_unnamed_arg4: (out) (optional): Return location for return parameter or %NULL to ignore.
  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to host_ipmi_call_send_message().
  * @error: Return location for error or %NULL.
  *
@@ -29463,8 +31115,8 @@
  * @arg_netfn: Argument to pass with the method invocation.
  * @arg_cmd: Argument to pass with the method invocation.
  * @arg_data: Argument to pass with the method invocation.
- * @out_unnamed_arg4: (out): Return location for return parameter or %NULL to ignore.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @out_unnamed_arg4: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL.
  *
  * Synchronously invokes the <link linkend="gdbus-method-org-openbmc-HostIpmi.sendMessage">sendMessage()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
@@ -29518,7 +31170,7 @@
  */
 void
 host_ipmi_complete_send_message (
-    HostIpmi *object,
+    HostIpmi *object G_GNUC_UNUSED,
     GDBusMethodInvocation *invocation,
     gint64 unnamed_arg4)
 {
@@ -29552,11 +31204,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (HostIpmiProxy, host_ipmi_proxy, G_TYPE_DBUS_PROXY,
                          G_ADD_PRIVATE (HostIpmiProxy)
-                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_proxy_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (HostIpmiProxy, host_ipmi_proxy, G_TYPE_DBUS_PROXY,
-                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_proxy_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_proxy_iface_init))
 
 #endif
 static void
@@ -29568,17 +31220,17 @@
 }
 
 static void
-host_ipmi_proxy_get_property (GObject      *object,
-  guint         prop_id,
-  GValue       *value,
+host_ipmi_proxy_get_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  GValue       *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
 
 static void
-host_ipmi_proxy_set_property (GObject      *object,
-  guint         prop_id,
-  const GValue *value,
+host_ipmi_proxy_set_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  const GValue *value G_GNUC_UNUSED,
   GParamSpec   *pspec G_GNUC_UNUSED)
 {
 }
@@ -29593,8 +31245,8 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
-  guint n;
+  gsize num_params;
+  gsize n;
   guint signal_id;
   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_host_ipmi_interface_info.parent_struct, signal_name);
   if (info == NULL)
@@ -29686,7 +31338,7 @@
 }
 
 static void
-host_ipmi_proxy_iface_init (HostIpmiIface *iface)
+host_ipmi_proxy_iface_init (HostIpmiIface *iface G_GNUC_UNUSED)
 {
 }
 
@@ -29694,15 +31346,15 @@
  * host_ipmi_proxy_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-HostIpmi.top_of_page">org.openbmc.HostIpmi</link>. See g_dbus_proxy_new() for more details.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call host_ipmi_proxy_new_finish() to get the result of the operation.
  *
  * See host_ipmi_proxy_new_sync() for the synchronous, blocking version of this constructor.
@@ -29749,9 +31401,9 @@
  * host_ipmi_proxy_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusProxyFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-HostIpmi.top_of_page">org.openbmc.HostIpmi</link>. See g_dbus_proxy_new_sync() for more details.
@@ -29786,13 +31438,13 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like host_ipmi_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call host_ipmi_proxy_new_for_bus_finish() to get the result of the operation.
  *
  * See host_ipmi_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -29841,7 +31493,7 @@
  * @flags: Flags from the #GDBusProxyFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like host_ipmi_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
@@ -29910,9 +31562,9 @@
   GVariantIter iter;
   GVariant *child;
   GValue *paramv;
-  guint num_params;
+  gsize num_params;
   guint num_extra;
-  guint n;
+  gsize n;
   guint signal_id;
   GValue return_value = G_VALUE_INIT;
   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
@@ -30078,7 +31730,7 @@
 }
 
 static void
-host_ipmi_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+host_ipmi_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
 {
 }
 
@@ -30116,11 +31768,11 @@
 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
 G_DEFINE_TYPE_WITH_CODE (HostIpmiSkeleton, host_ipmi_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
                          G_ADD_PRIVATE (HostIpmiSkeleton)
-                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_skeleton_iface_init))
 
 #else
 G_DEFINE_TYPE_WITH_CODE (HostIpmiSkeleton, host_ipmi_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_skeleton_iface_init));
+                         G_IMPLEMENT_INTERFACE (TYPE_HOST_IPMI, host_ipmi_skeleton_iface_init))
 
 #endif
 static void
@@ -30214,7 +31866,7 @@
  */
 
 typedef ObjectIface ObjectInterface;
-G_DEFINE_INTERFACE_WITH_CODE (Object, object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT));
+G_DEFINE_INTERFACE_WITH_CODE (Object, object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT);)
 
 static void
 object_default_init (ObjectIface *iface)
@@ -30226,7 +31878,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("hwmon", "hwmon", "hwmon", TYPE_HWMON, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("hwmon", "hwmon", "hwmon", TYPE_HWMON, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:fan:
@@ -30235,7 +31887,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("fan", "fan", "fan", TYPE_FAN, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("fan", "fan", "fan", TYPE_FAN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:sensor-value:
@@ -30244,7 +31896,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("sensor-value", "sensor-value", "sensor-value", TYPE_SENSOR_VALUE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("sensor-value", "sensor-value", "sensor-value", TYPE_SENSOR_VALUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:sensor-threshold:
@@ -30253,7 +31905,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("sensor-threshold", "sensor-threshold", "sensor-threshold", TYPE_SENSOR_THRESHOLD, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("sensor-threshold", "sensor-threshold", "sensor-threshold", TYPE_SENSOR_THRESHOLD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:sensor-i2c:
@@ -30262,7 +31914,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("sensor-i2c", "sensor-i2c", "sensor-i2c", TYPE_SENSOR_I2C, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("sensor-i2c", "sensor-i2c", "sensor-i2c", TYPE_SENSOR_I2C, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:sensor-match:
@@ -30271,7 +31923,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("sensor-match", "sensor-match", "sensor-match", TYPE_SENSOR_MATCH, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("sensor-match", "sensor-match", "sensor-match", TYPE_SENSOR_MATCH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:process:
@@ -30280,7 +31932,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("process", "process", "process", TYPE_PROCESS, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("process", "process", "process", TYPE_PROCESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:shared-resource:
@@ -30289,7 +31941,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("shared-resource", "shared-resource", "shared-resource", TYPE_SHARED_RESOURCE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("shared-resource", "shared-resource", "shared-resource", TYPE_SHARED_RESOURCE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:control:
@@ -30298,7 +31950,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("control", "control", "control", TYPE_CONTROL, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("control", "control", "control", TYPE_CONTROL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:control-bmc:
@@ -30307,7 +31959,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("control-bmc", "control-bmc", "control-bmc", TYPE_CONTROL_BMC, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("control-bmc", "control-bmc", "control-bmc", TYPE_CONTROL_BMC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:control-host:
@@ -30316,7 +31968,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("control-host", "control-host", "control-host", TYPE_CONTROL_HOST, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("control-host", "control-host", "control-host", TYPE_CONTROL_HOST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:control-power:
@@ -30325,7 +31977,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("control-power", "control-power", "control-power", TYPE_CONTROL_POWER, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("control-power", "control-power", "control-power", TYPE_CONTROL_POWER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:control-checkstop:
@@ -30334,7 +31986,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("control-checkstop", "control-checkstop", "control-checkstop", TYPE_CONTROL_CHECKSTOP, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("control-checkstop", "control-checkstop", "control-checkstop", TYPE_CONTROL_CHECKSTOP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:watchdog:
@@ -30343,7 +31995,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("watchdog", "watchdog", "watchdog", TYPE_WATCHDOG, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("watchdog", "watchdog", "watchdog", TYPE_WATCHDOG, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:event-log:
@@ -30352,7 +32004,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("event-log", "event-log", "event-log", TYPE_EVENT_LOG, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("event-log", "event-log", "event-log", TYPE_EVENT_LOG, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:flash:
@@ -30361,7 +32013,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("flash", "flash", "flash", TYPE_FLASH, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("flash", "flash", "flash", TYPE_FLASH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:flash-control:
@@ -30370,7 +32022,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("flash-control", "flash-control", "flash-control", TYPE_FLASH_CONTROL, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("flash-control", "flash-control", "flash-control", TYPE_FLASH_CONTROL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:button:
@@ -30379,7 +32031,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("button", "button", "button", TYPE_BUTTON, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("button", "button", "button", TYPE_BUTTON, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:led:
@@ -30388,7 +32040,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("led", "led", "led", TYPE_LED, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("led", "led", "led", TYPE_LED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * Object:host-ipmi:
@@ -30397,7 +32049,7 @@
    *
    * Connect to the #GObject::notify signal to get informed of property changes.
    */
-  g_object_interface_install_property (iface, g_param_spec_object ("host-ipmi", "host-ipmi", "host-ipmi", TYPE_HOST_IPMI, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+  g_object_interface_install_property (iface, g_param_spec_object ("host-ipmi", "host-ipmi", "host-ipmi", TYPE_HOST_IPMI, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 }
 
@@ -30407,7 +32059,7 @@
  *
  * Gets the #Hwmon instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Hwmon.top_of_page">org.openbmc.Hwmon</link> on @object, if any.
  *
- * Returns: (transfer full): A #Hwmon that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Hwmon that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Hwmon *object_get_hwmon (Object *object)
 {
@@ -30424,7 +32076,7 @@
  *
  * Gets the #Fan instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Fan.top_of_page">org.openbmc.Fan</link> on @object, if any.
  *
- * Returns: (transfer full): A #Fan that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Fan that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Fan *object_get_fan (Object *object)
 {
@@ -30441,7 +32093,7 @@
  *
  * Gets the #SensorValue instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorValue.top_of_page">org.openbmc.SensorValue</link> on @object, if any.
  *
- * Returns: (transfer full): A #SensorValue that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #SensorValue that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 SensorValue *object_get_sensor_value (Object *object)
 {
@@ -30458,7 +32110,7 @@
  *
  * Gets the #SensorThreshold instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorThreshold.top_of_page">org.openbmc.SensorThreshold</link> on @object, if any.
  *
- * Returns: (transfer full): A #SensorThreshold that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #SensorThreshold that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 SensorThreshold *object_get_sensor_threshold (Object *object)
 {
@@ -30475,7 +32127,7 @@
  *
  * Gets the #SensorI2c instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorI2c.top_of_page">org.openbmc.SensorI2c</link> on @object, if any.
  *
- * Returns: (transfer full): A #SensorI2c that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #SensorI2c that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 SensorI2c *object_get_sensor_i2c (Object *object)
 {
@@ -30492,7 +32144,7 @@
  *
  * Gets the #SensorMatch instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorMatch.top_of_page">org.openbmc.SensorMatch</link> on @object, if any.
  *
- * Returns: (transfer full): A #SensorMatch that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #SensorMatch that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 SensorMatch *object_get_sensor_match (Object *object)
 {
@@ -30509,7 +32161,7 @@
  *
  * Gets the #Process instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Process.top_of_page">org.openbmc.Process</link> on @object, if any.
  *
- * Returns: (transfer full): A #Process that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Process that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Process *object_get_process (Object *object)
 {
@@ -30526,7 +32178,7 @@
  *
  * Gets the #SharedResource instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SharedResource.top_of_page">org.openbmc.SharedResource</link> on @object, if any.
  *
- * Returns: (transfer full): A #SharedResource that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #SharedResource that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 SharedResource *object_get_shared_resource (Object *object)
 {
@@ -30543,7 +32195,7 @@
  *
  * Gets the #Control instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Control.top_of_page">org.openbmc.Control</link> on @object, if any.
  *
- * Returns: (transfer full): A #Control that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Control that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Control *object_get_control (Object *object)
 {
@@ -30560,7 +32212,7 @@
  *
  * Gets the #ControlBmc instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Bmc.top_of_page">org.openbmc.control.Bmc</link> on @object, if any.
  *
- * Returns: (transfer full): A #ControlBmc that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #ControlBmc that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 ControlBmc *object_get_control_bmc (Object *object)
 {
@@ -30577,7 +32229,7 @@
  *
  * Gets the #ControlHost instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Host.top_of_page">org.openbmc.control.Host</link> on @object, if any.
  *
- * Returns: (transfer full): A #ControlHost that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #ControlHost that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 ControlHost *object_get_control_host (Object *object)
 {
@@ -30594,7 +32246,7 @@
  *
  * Gets the #ControlPower instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Power.top_of_page">org.openbmc.control.Power</link> on @object, if any.
  *
- * Returns: (transfer full): A #ControlPower that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #ControlPower that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 ControlPower *object_get_control_power (Object *object)
 {
@@ -30611,7 +32263,7 @@
  *
  * Gets the #ControlCheckstop instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Checkstop.top_of_page">org.openbmc.control.Checkstop</link> on @object, if any.
  *
- * Returns: (transfer full): A #ControlCheckstop that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #ControlCheckstop that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 ControlCheckstop *object_get_control_checkstop (Object *object)
 {
@@ -30628,7 +32280,7 @@
  *
  * Gets the #Watchdog instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Watchdog.top_of_page">org.openbmc.Watchdog</link> on @object, if any.
  *
- * Returns: (transfer full): A #Watchdog that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Watchdog that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Watchdog *object_get_watchdog (Object *object)
 {
@@ -30645,7 +32297,7 @@
  *
  * Gets the #EventLog instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-EventLog.top_of_page">org.openbmc.EventLog</link> on @object, if any.
  *
- * Returns: (transfer full): A #EventLog that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #EventLog that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 EventLog *object_get_event_log (Object *object)
 {
@@ -30662,7 +32314,7 @@
  *
  * Gets the #Flash instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Flash.top_of_page">org.openbmc.Flash</link> on @object, if any.
  *
- * Returns: (transfer full): A #Flash that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Flash that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Flash *object_get_flash (Object *object)
 {
@@ -30679,7 +32331,7 @@
  *
  * Gets the #FlashControl instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-FlashControl.top_of_page">org.openbmc.FlashControl</link> on @object, if any.
  *
- * Returns: (transfer full): A #FlashControl that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #FlashControl that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 FlashControl *object_get_flash_control (Object *object)
 {
@@ -30696,7 +32348,7 @@
  *
  * Gets the #Button instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Button.top_of_page">org.openbmc.Button</link> on @object, if any.
  *
- * Returns: (transfer full): A #Button that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Button that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Button *object_get_button (Object *object)
 {
@@ -30713,7 +32365,7 @@
  *
  * Gets the #Led instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Led.top_of_page">org.openbmc.Led</link> on @object, if any.
  *
- * Returns: (transfer full): A #Led that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #Led that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 Led *object_get_led (Object *object)
 {
@@ -30730,7 +32382,7 @@
  *
  * Gets the #HostIpmi instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-HostIpmi.top_of_page">org.openbmc.HostIpmi</link> on @object, if any.
  *
- * Returns: (transfer full): A #HostIpmi that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
+ * Returns: (transfer full) (nullable): A #HostIpmi that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
  */
 HostIpmi *object_get_host_ipmi (Object *object)
 {
@@ -30748,9 +32400,9 @@
  *
  * Like object_get_hwmon() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Hwmon or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Hwmon or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Hwmon *object_peek_hwmon (Object *object)
 {
@@ -30768,9 +32420,9 @@
  *
  * Like object_get_fan() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Fan or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Fan or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Fan *object_peek_fan (Object *object)
 {
@@ -30788,9 +32440,9 @@
  *
  * Like object_get_sensor_value() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #SensorValue or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #SensorValue or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 SensorValue *object_peek_sensor_value (Object *object)
 {
@@ -30808,9 +32460,9 @@
  *
  * Like object_get_sensor_threshold() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #SensorThreshold or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #SensorThreshold or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 SensorThreshold *object_peek_sensor_threshold (Object *object)
 {
@@ -30828,9 +32480,9 @@
  *
  * Like object_get_sensor_i2c() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #SensorI2c or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #SensorI2c or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 SensorI2c *object_peek_sensor_i2c (Object *object)
 {
@@ -30848,9 +32500,9 @@
  *
  * Like object_get_sensor_match() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #SensorMatch or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #SensorMatch or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 SensorMatch *object_peek_sensor_match (Object *object)
 {
@@ -30868,9 +32520,9 @@
  *
  * Like object_get_process() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Process or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Process or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Process *object_peek_process (Object *object)
 {
@@ -30888,9 +32540,9 @@
  *
  * Like object_get_shared_resource() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #SharedResource or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #SharedResource or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 SharedResource *object_peek_shared_resource (Object *object)
 {
@@ -30908,9 +32560,9 @@
  *
  * Like object_get_control() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Control or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Control or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Control *object_peek_control (Object *object)
 {
@@ -30928,9 +32580,9 @@
  *
  * Like object_get_control_bmc() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #ControlBmc or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #ControlBmc or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 ControlBmc *object_peek_control_bmc (Object *object)
 {
@@ -30948,9 +32600,9 @@
  *
  * Like object_get_control_host() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #ControlHost or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #ControlHost or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 ControlHost *object_peek_control_host (Object *object)
 {
@@ -30968,9 +32620,9 @@
  *
  * Like object_get_control_power() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #ControlPower or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #ControlPower or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 ControlPower *object_peek_control_power (Object *object)
 {
@@ -30988,9 +32640,9 @@
  *
  * Like object_get_control_checkstop() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #ControlCheckstop or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #ControlCheckstop or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 ControlCheckstop *object_peek_control_checkstop (Object *object)
 {
@@ -31008,9 +32660,9 @@
  *
  * Like object_get_watchdog() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Watchdog or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Watchdog or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Watchdog *object_peek_watchdog (Object *object)
 {
@@ -31028,9 +32680,9 @@
  *
  * Like object_get_event_log() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #EventLog or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #EventLog or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 EventLog *object_peek_event_log (Object *object)
 {
@@ -31048,9 +32700,9 @@
  *
  * Like object_get_flash() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Flash or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Flash or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Flash *object_peek_flash (Object *object)
 {
@@ -31068,9 +32720,9 @@
  *
  * Like object_get_flash_control() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #FlashControl or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #FlashControl or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 FlashControl *object_peek_flash_control (Object *object)
 {
@@ -31088,9 +32740,9 @@
  *
  * Like object_get_button() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Button or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Button or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Button *object_peek_button (Object *object)
 {
@@ -31108,9 +32760,9 @@
  *
  * Like object_get_led() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #Led or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #Led or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 Led *object_peek_led (Object *object)
 {
@@ -31128,9 +32780,9 @@
  *
  * Like object_get_host_ipmi() but doesn't increase the reference count on the returned object.
  *
- * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ * It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.
  *
- * Returns: (transfer none): A #HostIpmi or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
+ * Returns: (transfer none) (nullable): A #HostIpmi or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
  */
 HostIpmi *object_peek_host_ipmi (Object *object)
 {
@@ -31182,7 +32834,7 @@
 
 G_DEFINE_TYPE_WITH_CODE (ObjectProxy, object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
                          G_IMPLEMENT_INTERFACE (TYPE_OBJECT, object_proxy__object_iface_init)
-                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, object_proxy__g_dbus_object_iface_init));
+                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, object_proxy__g_dbus_object_iface_init))
 
 static void
 object_proxy_init (ObjectProxy *object G_GNUC_UNUSED)
@@ -31391,7 +33043,7 @@
 
 G_DEFINE_TYPE_WITH_CODE (ObjectSkeleton, object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
                          G_IMPLEMENT_INTERFACE (TYPE_OBJECT, object_skeleton__object_iface_init)
-                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, object_skeleton__g_dbus_object_iface_init));
+                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, object_skeleton__g_dbus_object_iface_init))
 
 static void
 object_skeleton_init (ObjectSkeleton *object G_GNUC_UNUSED)
@@ -31840,7 +33492,7 @@
 /**
  * object_skeleton_set_hwmon:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Hwmon or %NULL to clear the interface.
+ * @interface_: (nullable): A #Hwmon or %NULL to clear the interface.
  *
  * Sets the #Hwmon instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Hwmon.top_of_page">org.openbmc.Hwmon</link> on @object.
  */
@@ -31852,7 +33504,7 @@
 /**
  * object_skeleton_set_fan:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Fan or %NULL to clear the interface.
+ * @interface_: (nullable): A #Fan or %NULL to clear the interface.
  *
  * Sets the #Fan instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Fan.top_of_page">org.openbmc.Fan</link> on @object.
  */
@@ -31864,7 +33516,7 @@
 /**
  * object_skeleton_set_sensor_value:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #SensorValue or %NULL to clear the interface.
+ * @interface_: (nullable): A #SensorValue or %NULL to clear the interface.
  *
  * Sets the #SensorValue instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorValue.top_of_page">org.openbmc.SensorValue</link> on @object.
  */
@@ -31876,7 +33528,7 @@
 /**
  * object_skeleton_set_sensor_threshold:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #SensorThreshold or %NULL to clear the interface.
+ * @interface_: (nullable): A #SensorThreshold or %NULL to clear the interface.
  *
  * Sets the #SensorThreshold instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorThreshold.top_of_page">org.openbmc.SensorThreshold</link> on @object.
  */
@@ -31888,7 +33540,7 @@
 /**
  * object_skeleton_set_sensor_i2c:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #SensorI2c or %NULL to clear the interface.
+ * @interface_: (nullable): A #SensorI2c or %NULL to clear the interface.
  *
  * Sets the #SensorI2c instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorI2c.top_of_page">org.openbmc.SensorI2c</link> on @object.
  */
@@ -31900,7 +33552,7 @@
 /**
  * object_skeleton_set_sensor_match:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #SensorMatch or %NULL to clear the interface.
+ * @interface_: (nullable): A #SensorMatch or %NULL to clear the interface.
  *
  * Sets the #SensorMatch instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SensorMatch.top_of_page">org.openbmc.SensorMatch</link> on @object.
  */
@@ -31912,7 +33564,7 @@
 /**
  * object_skeleton_set_process:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Process or %NULL to clear the interface.
+ * @interface_: (nullable): A #Process or %NULL to clear the interface.
  *
  * Sets the #Process instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Process.top_of_page">org.openbmc.Process</link> on @object.
  */
@@ -31924,7 +33576,7 @@
 /**
  * object_skeleton_set_shared_resource:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #SharedResource or %NULL to clear the interface.
+ * @interface_: (nullable): A #SharedResource or %NULL to clear the interface.
  *
  * Sets the #SharedResource instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-SharedResource.top_of_page">org.openbmc.SharedResource</link> on @object.
  */
@@ -31936,7 +33588,7 @@
 /**
  * object_skeleton_set_control:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Control or %NULL to clear the interface.
+ * @interface_: (nullable): A #Control or %NULL to clear the interface.
  *
  * Sets the #Control instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Control.top_of_page">org.openbmc.Control</link> on @object.
  */
@@ -31948,7 +33600,7 @@
 /**
  * object_skeleton_set_control_bmc:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #ControlBmc or %NULL to clear the interface.
+ * @interface_: (nullable): A #ControlBmc or %NULL to clear the interface.
  *
  * Sets the #ControlBmc instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Bmc.top_of_page">org.openbmc.control.Bmc</link> on @object.
  */
@@ -31960,7 +33612,7 @@
 /**
  * object_skeleton_set_control_host:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #ControlHost or %NULL to clear the interface.
+ * @interface_: (nullable): A #ControlHost or %NULL to clear the interface.
  *
  * Sets the #ControlHost instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Host.top_of_page">org.openbmc.control.Host</link> on @object.
  */
@@ -31972,7 +33624,7 @@
 /**
  * object_skeleton_set_control_power:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #ControlPower or %NULL to clear the interface.
+ * @interface_: (nullable): A #ControlPower or %NULL to clear the interface.
  *
  * Sets the #ControlPower instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Power.top_of_page">org.openbmc.control.Power</link> on @object.
  */
@@ -31984,7 +33636,7 @@
 /**
  * object_skeleton_set_control_checkstop:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #ControlCheckstop or %NULL to clear the interface.
+ * @interface_: (nullable): A #ControlCheckstop or %NULL to clear the interface.
  *
  * Sets the #ControlCheckstop instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-control-Checkstop.top_of_page">org.openbmc.control.Checkstop</link> on @object.
  */
@@ -31996,7 +33648,7 @@
 /**
  * object_skeleton_set_watchdog:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Watchdog or %NULL to clear the interface.
+ * @interface_: (nullable): A #Watchdog or %NULL to clear the interface.
  *
  * Sets the #Watchdog instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Watchdog.top_of_page">org.openbmc.Watchdog</link> on @object.
  */
@@ -32008,7 +33660,7 @@
 /**
  * object_skeleton_set_event_log:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #EventLog or %NULL to clear the interface.
+ * @interface_: (nullable): A #EventLog or %NULL to clear the interface.
  *
  * Sets the #EventLog instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-EventLog.top_of_page">org.openbmc.EventLog</link> on @object.
  */
@@ -32020,7 +33672,7 @@
 /**
  * object_skeleton_set_flash:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Flash or %NULL to clear the interface.
+ * @interface_: (nullable): A #Flash or %NULL to clear the interface.
  *
  * Sets the #Flash instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Flash.top_of_page">org.openbmc.Flash</link> on @object.
  */
@@ -32032,7 +33684,7 @@
 /**
  * object_skeleton_set_flash_control:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #FlashControl or %NULL to clear the interface.
+ * @interface_: (nullable): A #FlashControl or %NULL to clear the interface.
  *
  * Sets the #FlashControl instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-FlashControl.top_of_page">org.openbmc.FlashControl</link> on @object.
  */
@@ -32044,7 +33696,7 @@
 /**
  * object_skeleton_set_button:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Button or %NULL to clear the interface.
+ * @interface_: (nullable): A #Button or %NULL to clear the interface.
  *
  * Sets the #Button instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Button.top_of_page">org.openbmc.Button</link> on @object.
  */
@@ -32056,7 +33708,7 @@
 /**
  * object_skeleton_set_led:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #Led or %NULL to clear the interface.
+ * @interface_: (nullable): A #Led or %NULL to clear the interface.
  *
  * Sets the #Led instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-Led.top_of_page">org.openbmc.Led</link> on @object.
  */
@@ -32068,7 +33720,7 @@
 /**
  * object_skeleton_set_host_ipmi:
  * @object: A #ObjectSkeleton.
- * @interface_: (allow-none): A #HostIpmi or %NULL to clear the interface.
+ * @interface_: (nullable): A #HostIpmi or %NULL to clear the interface.
  *
  * Sets the #HostIpmi instance for the D-Bus interface <link linkend="gdbus-interface-org-openbmc-HostIpmi.top_of_page">org.openbmc.HostIpmi</link> on @object.
  */
@@ -32104,7 +33756,7 @@
  * Class structure for #ObjectManagerClient.
  */
 
-G_DEFINE_TYPE (ObjectManagerClient, object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT);
+G_DEFINE_TYPE (ObjectManagerClient, object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)
 
 static void
 object_manager_client_init (ObjectManagerClient *manager G_GNUC_UNUSED)
@@ -32120,12 +33772,12 @@
  * object_manager_client_get_proxy_type:
  * @manager: A #GDBusObjectManagerClient.
  * @object_path: The object path of the remote object (unused).
- * @interface_name: (allow-none): Interface name of the remote object or %NULL to get the object proxy #GType.
+ * @interface_name: (nullable): Interface name of the remote object or %NULL to get the object proxy #GType.
  * @user_data: User data (unused).
  *
- * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy<!-- -->- and #GDBusProxy<!-- -->-derived types.
+ * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy derived and #GDBusProxy derived types.
  *
- * Returns: A #GDBusProxy<!-- -->-derived #GType if @interface_name is not %NULL, otherwise the #GType for #ObjectProxy.
+ * Returns: A #GDBusProxy derived #GType if @interface_name is not %NULL, otherwise the #GType for #ObjectProxy.
  */
 GType
 object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name, gpointer user_data G_GNUC_UNUSED)
@@ -32171,15 +33823,15 @@
  * object_manager_client_new:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Asynchronously creates #GDBusObjectManagerClient using object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details.
  *
- * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call object_manager_client_new_finish() to get the result of the operation.
  *
  * See object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
@@ -32226,9 +33878,9 @@
  * object_manager_client_new_sync:
  * @connection: A #GDBusConnection.
  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Synchronously creates #GDBusObjectManagerClient using object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
@@ -32263,13 +33915,13 @@
  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  * @user_data: User data to pass to @callback.
  *
  * Like object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection.
  *
- * 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.
+ * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
  * You can then call object_manager_client_new_for_bus_finish() to get the result of the operation.
  *
  * See object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor.
@@ -32318,7 +33970,7 @@
  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
  * @name: A bus name (well-known or unique).
  * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
  * @error: Return location for error or %NULL
  *
  * Like object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
diff --git a/libopenbmc_intf/openbmc_intf.h b/libopenbmc_intf/openbmc_intf.h
index 122354e..a71d59f 100644
--- a/libopenbmc_intf/openbmc_intf.h
+++ b/libopenbmc_intf/openbmc_intf.h
@@ -1,7 +1,9 @@
 /*
- * Generated by gdbus-codegen 2.48.2. DO NOT EDIT.
+ * This file is generated by gdbus-codegen, do not modify it.
  *
- * The license of this code is the same as for the source it was derived from.
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from. Note that it links to GLib, so must comply with the
+ * LGPL linking clauses.
  */
 
 #ifndef __OPENBMC_INTF_H__
