python D-Bus: get_type() -> contant names?

Alban Crequy alban.crequy at collabora.co.uk
Fri Mar 14 04:48:08 PDT 2008


Hi,

I want to write a python application that receives all messages from
the bus for debugging purposes (like dbus-monitor in python). My
application sometimes call methods on org.freedesktop.DBus
(e.g. with bus.list_names())

I reveive all messages:
  bus.add_match_string("")
  bus.add_message_filter(msg_cb)

In the callback, I test the message type with:
  msg.get_type()

What is the name of contants in python for
DBUS_MESSAGE_TYPE_{METHOD_{CALL,RETURN},ERROR,SIGNAL}? I want to avoid
using "if msg.get_type() == 4".

-- 
Alban


More information about the dbus mailing list