User authentication to services

David Zeuthen david at fubar.dk
Tue Jun 22 05:44:10 PDT 2004


On Fri, Jun 18, 2004 at 04:25:14PM +0200, Olivier Andrieu wrote:
> What's wrong with having two different methods ? With a single
> GetProperty method the reply message carries either an INT32 or a
> STRING. That(s not very nice.
> 

In HAL we deal a lot with properties and expose both something a'la

 ANY GetProperty(..)
 STRING GetPropertyString(..)
 INT32 GetPropertyInt32(..)
 ..

so e.g. in like Python you'd use the GetProperty method whereas in
strongly typed languages you'd use the method with the typename after
it. If the user tries GetPropertyString("UID") an exception is thrown
because of type mismatch.

Cheers,
David




More information about the dbus mailing list