if (rule->flags & BUS_MATCH_MESSAGE_TYPE)
{
- /* FIXME make type readable */
- if (!_dbus_string_append_printf (&str, "type='%d'", rule->message_type))
- goto nomem;
+ if (rule->message_type == DBUS_MESSAGE_TYPE_INVALID)
+ {
+ if (!_dbus_string_append_printf (&str, "type='INVALID'"))
+ goto nomem;
+ }
+ else if (rule->message_type == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ {
+ if (!_dbus_string_append_printf (&str, "type='method_call'"))
+ goto nomem;
+ }
+ else if (rule->message_type == DBUS_MESSAGE_TYPE_METHOD_RETURN)
+ {
+ if (!_dbus_string_append_printf (&str, "type='method_return'"))
+ goto nomem;
+ }
+ else if (rule->message_type == DBUS_MESSAGE_TYPE_ERROR)
+ {
+ if (!_dbus_string_append_printf (&str, "type='error'"))
+ goto nomem;
+ }
+ else if (rule->message_type == DBUS_MESSAGE_TYPE_SIGNAL)
+ {
+ if (!_dbus_string_append_printf (&str, "type='signal'"))
+ goto nomem;
+ }
+ else
+ {
+ if (!_dbus_string_append_printf (&str, "type='%d'", rule->message_type))
+ goto nomem;
+ }
}
if (rule->flags & BUS_MATCH_INTERFACE)