Introspecting Dbus

This is an initial stab at introspecting the methods available on dbus.

I've used python and the dbus-python tools. The dbus-python in ipkg isn't quite built properly, and will throw and error. I'm working on fixing the build in the ipkg-optware repository. For now, you can circumvent the problem by replacing some symbol names in /opt/lib/python2.5/site-packages/dbus_bindings.so — just replace all occurrences of UCS2 with UCS4. It's a binary file, so make sure you use an editing method that will not corrupt the file (I used sed -ie 's/UCS2/UCS4/g')

Now, here's the basic Python introspection program:

from dbus import SessionBus, Interface
from dbus.introspect_parser import process_introspection_data

def introspect_object(named_service, object_path):
    obj = SessionBus().get_object(named_service, object_path)
    iface = Interface(obj, 'org.freedesktop.DBus.Introspectable')
    return process_introspection_data(iface.Introspect())

root@castle:/var/home/root# cat di.py 
from dbus import SessionBus, Interface
from dbus._expat_introspect_parser import process_introspection_data

if __name__=="__main__":
    bus = SessionBus() 
    names = bus.list_names()
    for name in names:
    if 'com.palm' in name:
            print "Introspecting %s"%name
            print
            obj = bus.get_object(name, '/')
            iface = Interface(obj, 'org.freedesktop.DBus.Introspectable')
            print iface.Introspect()
            print 
            print

Here's the result:

Introspecting com.palm.pimsync

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.pubsubservice

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
</node>

Introspecting com.palm.location

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.vm

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.mail

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.taskScheduler

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.preferences

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
  <node name="systemProperties"/>
</node>

Introspecting com.palm.luna

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
</node>

Introspecting com.palm.storage

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
  <node name="storaged"/>
</node>

Introspecting com.palm.applicationManager

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
</node>

Introspecting com.palm.calendar

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.mediaevents

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.backup

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.messaging

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.power

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
  <node name="timeout"/>
</node>

Introspecting com.palm.accountservices

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.dataimport

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.messagingrouter

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.tasks

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.connectionmanager

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
</node>

Introspecting com.palm.contacts

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.customization

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.deviceprofile

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.audio

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
  <node name="dtmf"/>
  <node name="feedback"/>
  <node name="media"/>
  <node name="nav"/>
  <node name="phone"/>
  <node name="ringtone"/>
  <node name="state"/>
  <node name="system"/>
  <node name="systemsounds"/>
  <node name="telephony"/>
  <node name="udev"/>
  <node name="vibrate"/>
  <node name="voiceDialing"/>
</node>

Introspecting com.palm.telephony

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.data.carriernetworksettings

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.accounts

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}

Introspecting com.palm.systemservice

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="com"/>
  <node name="time"/>
  <node name="wallpaper"/>
</node>

Introspecting com.palm.vmstatus

{"errorCode":"ErrorGenericUnknownMethod", "errorText":"Unknown Method"}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License