Re: [Bluez-devel] bluetoothd D-Bus interface proposals(draft 00.05)

P. Durante
2005-08-22T14:26:00Z

On 8/22/05, Claudio Takahasi <cktakahasi@gmail.com> wrote:
> Hi Peter,
>=20
> I am planning provide a D-Bus service for setup a default adapter. But
> the developer will
> have to call a service to discover all available adapters. The steps shal=
l be:
> 1. Call a method to discover the available adapters
> org.bluez.bluetoothd.getAdapters will return a array of the
> available devices
>=20

That's exactly what I do now in org.bluetool.manager.ListDevices.
I was thinking if it's worth returning, for each adapter, together
with the device path, a boolean value indicating if the device is up
or not, so that applications can immediately check what adapters a
effectively 'available'
ps: I also added signals which are broadcasted when an interface is
brought up/down

Another big concern I'm having is about security, most hciconfig
commands require 'higher than normal' privileges to execute, should
the daemon allow certain requests only to the root user ? (luckily
dbus was conceived with security in mind, so adding such a policy
would not be difficult).
This would just make things more complicated and I don't think there's
any real gain in doing so, but maybe there are some security issues I
ignore at the moment, let me know your opinion.
(if for example, a program calls ListDevices to list the adapters, and
the user wants to use an interface which is not active, should the
program be allowed to bring it up?)

> 2. Call a method to setup the default adapter.
> org.bluez.bluetoothd.setDefaultAdapter, passing the adapter id
>=20

What if two (or more) applications chose, for whatever reason, to set
a different default adapter? If you *really* want such a mechanism,
maybe you should make such a method callable only by authorized code
(hence my dilemma above) or simply select the default adapter
internally in the daemon and don't expose this method at all.

> After that you will be able call the services passing the default path
>=20
> In the future we can try discover the best adapter to use and set it as
> default.
>=20
> Regards,
> Claudio.
>=20
>=20

Regards,
Paul