signal sender=:1.496 -> dest=(null destination) serial=3979 path=/org/freedesktop/Telepathy/Connection/gabble/jabber/username_40gmail_2ecom_2fMaemo; interface=org.freedesktop.Telepathy.Connection.Interface.SimplePresence; member=PresencesChanged
array [
dict entry(
uint32 209
struct {
uint32 2
string "available"
string "243"
}
)
]
#! /usr/bin/python
import gobject, dbus
from dbus.mainloop.glib import DBusGMainLoop
def handle_presence():
print "status changed"
if __name__ == '__main__':
print "starting"
DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(handle_presence, 'PresencesChanged', 'org.freedesktop.Telepathy.Connection.Interface.SimplePresence', None, '/org/freedesktop/Telepathy/Connection/gabble/jabber/username_40gmail_2ecom_2fMaemo')
gobject.MainLoop().run()
| The Following User Says Thank You to nicolai For This Useful Post: | ||
def handle_presence(*args):
print "status changed",args
status changed (dbus.Dictionary({dbus.UInt32(1L): dbus.Struct((dbus.UInt32(2L), dbus.String(u'available'), dbus.String(u'')), signature=None)}, signature=dbus.Signature('u(uss)')),)
bus.add_signal_receiver(handle_presence, 'StatusChanged', 'org.freedesktop.Telepathy.Connection', None, '/org/freedesktop/Telepathy/Connection/gabble/jabber/username_40gmail_2ecom_2fMaemo')
status changed (dbus.UInt32(1L), dbus.UInt32(1L)) status changed (dbus.UInt32(0L), dbus.UInt32(1L))
status changed (dbus.UInt32(2L), dbus.UInt32(1L))
(dbus.Dictionary({dbus.UInt32(3L): dbus.Struct((dbus.UInt32(4L), dbus.String(u'xa'), dbus.String(u"I'm away from my computer")), signature=None)}, signature=dbus.Signature('u(uss)')),)
| The Following User Says Thank You to daperl For This Useful Post: | ||