Thanks Danielle. "Basically, whatever interface a method, or signal comes from, you pass that as the key to the object." - Is this a dbus-python feature? -A
On Sun, Jan 17, 2010 at 5:40 PM, Danielle Madeley < danielle.made...@collabora.co.uk> wrote: > On Sun, 2010-01-17 at 16:00 -0800, Anand CVR wrote: > > Question: Is cm an array or just one ConnectionManager object? The > > syntax cm[CONNECTION_MANAGER] seems to suggest that it is an array. > > But the GetManager() method seems to return just a ConnectionManager > > object. > > cm is an object, but since D-Bus objects implement multiple interfaces > we use the dictionary-style, getattr syntax to be able to specify which > D-Bus interface we are making the method call on (this syntax is also > used in Python for dictionary keys, which is a little more synonymous > with what's going on here). > > This probably could be explain a little better in the book (it currently > gets one sentence): > > http://people.collabora.co.uk/~danni/telepathy-book/sect.basics.language-bindings.html#sect.basics.dbus.language-bindings.python<http://people.collabora.co.uk/%7Edanni/telepathy-book/sect.basics.language-bindings.html#sect.basics.dbus.language-bindings.python> > > Basically, whatever interface a method, or signal comes from, you pass > that as the key to the object. > > Hope this clears things up. > > --d > > -- > Danielle Madeley > Software Developer, Collabora Ltd. Melbourne, Australia > > www.collabora.co.uk > >
_______________________________________________ telepathy mailing list telepathy@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/telepathy