Jesus! I don't want to write a OS notify solution, because that would mean making my app depend on an different event loop in each OS. That is going to cause far more problems than it solves. Indeed, I dont want to have to depend on an event loop at all for the command line interface and writing separate code for each interface for 3 different platforms is just not acceptable. I already have a perfectly good polling based solution (using libusb, which I've ported to OS X) that takes very little system resource, just run libprs500 and see and that works perfectly well on 3 different platforms.
All I need now is a simple way to map usb product ids to mount points that does not depend on having a particular file system. I'm hoping ioreg does that. It doesn't matter if ioreg is resource heavy since this call is made only on initial device detection.
|