Semantics of o.fd.DBus.Properties

Matthew Johnson dbus at matthew.ath.cx
Fri Feb 8 07:57:03 PST 2008


On Fri Feb 08 15:50, Daniel P. Berrange wrote:

> Yes, on the service side we require that all method names and properties
> in an object are unique. You can have multiple interfaces on an object
> but we don't provide any way to define methods with the same name in
> two interfaces on the same object.
> 
> This is because you simply define a method in perl and annotate it
> to export it in the service - the perl method and the exported name
> have to be the same and the impls are all in the same Perl package
> namespace.

This is pretty equivalent to how dbus-java works. What I do provide is a
method which can be called within a handler to get some data about the
call in progress, such as sender address and the interface on which it
was called. It's not nice, but I think it's a rare case, and it is
supported. You'd write something like:

public void set(Variant value)
{
   DBusCallInfo i = conn.getCallInfo();
   if (i.getInterface().equals("org.foo.bar")) {
      // do one thing
   } else {
      // do something else
   }
}
-- 
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080208/6183247f/attachment.pgp 


More information about the dbus mailing list