Question on service activation
Thiago Macieira
thiago at kde.org
Thu Feb 22 14:46:42 PST 2007
Kevin Krammer wrote:
>Hmm, well.
>Seem I didn't get the right words the first time, I'll try again.
Ok.
>Application Okular wants to send the current document by email. It knows
> that any email service will implement the interface pim.EMail
Ok.
>One of my questions in the original mail was: can an application assume
>equality between interface name and D-Bus connection name and maybe even
>equality (apart from the separator) with object path.
No.
>Or in the example, can Okular do the equivalent of
>dbus-send --dest=pim.EMail /pim/EMail pim.EMail.OpenComposer ...
As long as we standardise that "pim.EMail" is the service name that the
default email component must take on the bus, yes.
>The next question is a follow up: what if the process implementing
> pim.EMail also implements pim.Contacts.
Orthogonal to the discussion. The process could be implementing
org.freedesktop.DBus too for all we care.
>Ideally the process will end up owning both names, but if one
> application activated pim.EMail and one activated pim.Contacts, isn't
> it a race condition between the process registering both names and the
> bus starting the a second instance of the process?
There is no race condition because there's no locking involved in
acquiring service names.
Wait... do you mean that app A sent a message to activatable but not
running service name X, then app B sent a message to activatable but not
running service Y; then application providing service Y actually
requested name X too?
Well, I guess the D-Bus message will be delivered to application Y. Since
it requested that service name, it must be able to handle any messages
sent to that service.
User preferences don't apply here. If the user doesn't want application Y
to be service X, it isn't D-Bus that's going to stop it. The application
must knowingly not register that service.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070222/437d0a6a/attachment.pgp
More information about the dbus
mailing list