Hi,
I've been looking through the cupcake sensor framework code.  It's
puzzling me that certain parts of the code look like they are designed
to support multiple devices, in the sense of having multiple control
device file descriptors, but other parts of the code give no means of
accessing things this way.

In sensors.h, function pointers open_data_source and so on are set to
take a pointer to struct sensors_control_device_t.  The original
module open passes in a handle to that pointer type, so obviously one
could set up an array of devices.  It would be nice to then pass a
particular device when, say, changing the sensor event delay.  But in
all the SensorService and SensorManager code, I see no way to use any
parameter besides the base sSensorDevice pointers (which aren't
globally accessible).

So, if I have two devices I need to open (say, /dev/foo and /dev/bar),
am I just supposed to track file descriptors for them internally?
What's the point of passing back a fd at all then?  Seems so close to
be nice and general, but not quite.  Am I missing the point somewhere?

Thanks much,
Hod

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to