The earlier implementation IIRC worked in the following way.
App -> contractor [give me a list if programs that handle file type x]
<- [program a b ... ..]
App asks the user to select one or selects one itself and
App -> Contractor [program Id x, for file/uri y]
<- [command string]
App executes this using execv or something similar.
The '->' is for dbus function calls and '<-' for return.
Dbus is just a protocol for doing interprocess communication so a
program/script can use contractor if it can use dbus.