Bug 624546 – Modification of GDBusMessage in filter function

Allow modifying a GDBusMessage in a filter function and also add tests
for this. This breaks API but leaves ABI (almost) intact - at least
dconf's GSettings backend (the only big user I know of) will keep
working.

https://bugzilla.gnome.org/show_bug.cgi?id=624546

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2010-08-05 20:37:27 -04:00
parent 6d359d6029
commit 3ff9894826
9 changed files with 298 additions and 48 deletions

View File

@@ -1214,6 +1214,31 @@ typedef enum
G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 'l'
} GDBusMessageByteOrder;
/**
* GDBusMessageFilterResult:
* @G_DBUS_MESSAGE_FILTER_RESULT_NO_EFFECT: The filter function had
* no effect on the message - the message will be passed on to the
* next filter function and/or sent to the remote peer.
* @G_DBUS_MESSAGE_FILTER_RESULT_MESSAGE_CONSUMED: The message was
* consumed by the filter function and will be dropped - the message
* will not be passed to other filter functions and/or sent to the
* remote peer.
* @G_DBUS_MESSAGE_FILTER_RESULT_MESSAGE_ALTERED: The message was
* modified - the message will still be passed on to the next filter
* function and/or sent to the remote peer.
*
* Possible return values for #GDBusMessageFilterFunction when
* handling a #GDBusMessage.
*
* Since: 2.26
*/
typedef enum
{
G_DBUS_MESSAGE_FILTER_RESULT_NO_EFFECT,
G_DBUS_MESSAGE_FILTER_RESULT_MESSAGE_CONSUMED,
G_DBUS_MESSAGE_FILTER_RESULT_MESSAGE_ALTERED
} GDBusMessageFilterResult;
G_END_DECLS
#endif /* __GIO_ENUMS_H__ */