A filter function is passed a #GDBusMessage and expected to return
a #GDBusMessage too. Passive filter functions that don't modify the
message can simply return the message object:
If the returned #GDBusMessage is different from message and cannot
be sent on connection (it could use features, such as file
descriptors, not compatible with connection), then a warning is
logged to standard error. Applications can
check this ahead of time using gio.dbus_message.DBusMessage.toBlob passing a
#GDBusCapabilityFlags value obtained from connection.
A #GDBusMessage that will be freed with
gobject.object.ObjectG.unref or null to drop the message. Passive filter
functions can simply return the passed message object.
Signature for function used in gio.dbus_connection.DBusConnection.addFilter.
A filter function is passed a #GDBusMessage and expected to return a #GDBusMessage too. Passive filter functions that don't modify the message can simply return the message object:
Filter functions that wants to drop a message can simply return null:
Finally, a filter function may modify a message by copying it:
If the returned #GDBusMessage is different from message and cannot be sent on connection (it could use features, such as file descriptors, not compatible with connection), then a warning is logged to standard error. Applications can check this ahead of time using gio.dbus_message.DBusMessage.toBlob passing a #GDBusCapabilityFlags value obtained from connection.