[maemo-developers] D-BUS service name confusion

From: josh.soref at nokia.com josh.soref at nokia.com
Date: Thu May 29 10:53:19 EEST 2008
Kimmo wrote:
> libosso.h says:
> * @param application The name of the application.
>  * This name forms the last part of the default (D-BUS)
> service name of the
>  * application.

This is wrong. Last part implies that "foo.bar" will become either "com.nokia.foo.bar" or "com.nokia.bar" neither of which are correct,
As it will actually become "foo.bar"

> Note that the D-BUS service name will be
>  * 'com.nokia.application', where 'application' is the value
> you gave as the
>  * parameter. Note also that this argument must be identical to the
>  * X-Osso-Service value in the desktop file, or the D-BUS
> daemon will kill
>  * your application.

This is wrong. As "application" is not identical to "com.nokia.application"

It needs to say the resolved value.

And in fact, this special casing of Nokia is just plain stupid.
But that's a different story. Vendors should not make it easy for everyone else to claim to be them.

If a vendor wants to make it easy for the vendor's own apps to save characters, it should use a vendor specific wrapper.
Note that this "shortcut" is probably a perf penalty since it has to involve extra checks and copies/allocs.

The byte savings on flash are really not worth any of this.

> If you do not want to use the default
> 'com.nokia' prefix, 
>  * you must pass the whole D-Bus service name, e.g.
> 'org.maemo.my_app'. 

This should not be embedded into the same "paragraph".

>  * The only valid characters that the name may contain are
> letters a-z and
>  * the underscore '_'.

More information about the maemo-developers mailing list