Plans for hal 0.5.x
David Zeuthen
david at fubar.dk
Tue Dec 14 09:56:28 PST 2004
On Tue, 2004-12-14 at 19:03 +0300, Andrei Yurkevich wrote:
> > Well, since each connection method (USB, serial, bluetooth, etc) is
> > actually a hardware device itself, why not show the PDA as a _child_ of
> > that device? We are working with parent/child relationships as a
> > fundamental property of HAL already. Therefore you wouldn't necessarily
> > need a "pda.palm.serial_interface" property, you could just ask for the
> > "device.interface" (or something) property of the parent of the PDA
> > object.
>
> I am absolutely agreed with you about having a PDA device as a child
> node of the serial interface, but still I think that creating that node
> and filling it with pda-specific information should be done outside of
> hal.
Again, the program doing this should run in the desktop session anyway
and already knows, so it needs not to tell hal about it.
> For that reason, HAL could just query the serial interface about
> what's on the other side and if that is PDA it could simply tag the
> serial interface. Then some callout or daemon that knows how to deal
> with different kinds of PDAs (or at leas that kind of PDA connected
> there) could create the PDA node below the serial port and set the
> necessary properties there.
>
You can't really probe a serial port since that may interfere with it's
operation. I don't think hal should attempt to do that, that's a can of
worms. E.g. if you really want to support legacy ports in your desktop
software, you need to take the painful route and do it from your desktop
sessions - e.g. the "Detect Modem" or "Detect PDA" button and then deal
with it. No such thing as a free lunch (reminds me; I should go to
lunch :-)).
> > It would seem like having that property on both the PDA _and_
> > the actual device itself would be redundant. (however, I can see it
> > being useful on the PDA so I'm not really objecting to having it there).
>
> In some cases, the fact that the serial port is there does not
> necessarily mean that PDA is available. For instance, when you plug in a
> Pocket PC PDA via USB, you will get a USB device and a USB-serial
> interface, but until you start the software that establishes a
> connection with your PDA you are not able to do anything useful with it.
>
No, but the fact that desktop software knows that there is a 100% chance
of the serial port having a PDA in the other end allows it to start
doing things with it. Like initiating a sync.
That's why I only think it's useful to consider plug and play devices.
Cheers,
David
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list