/**
* GDBusProxy::g-properties-changed:
* @proxy: The #GDBusProxy emitting the signal.
- * @changed_properties: A #GVariant containing the properties that
- * changed or %NULL if no properties changed.
- * @invalidated_properties: A %NULL terminated list of properties that was
- * invalidated or %NULL if no properties was invalidated.
+ * @changed_properties: A #GVariant containing the properties that changed
+ * @invalidated_properties: A %NULL terminated array of properties that was invalidated
*
* Emitted when one or more D-Bus properties on @proxy changes. The
- * local cache has already been updated when this signal fires.
+ * local cache has already been updated when this signal fires. Note
+ * that both @changed_properties and @invalidated_properties are
+ * guaranteed to never be %NULL (either may be empty though).
*
* This signal corresponds to the
* <literal>PropertiesChanged</literal> D-Bus signal on the
const gchar* const *invalidated_properties,
gpointer user_data)
{
+ /* Note that we are guaranteed that changed_properties and
+ * invalidated_properties are never NULL
+ */
- if (changed_properties != NULL)
+ if (g_variant_n_children (changed_properties) > 0)
{
GVariantIter *iter;
GVariant *item;
}
}
- if (invalidated_properties != NULL)
+ if (g_strv_length ((GStrv) invalidated_properties) > 0)
{
guint n;
g_print (" *** Properties Invalidated:\n");