Say I have two gypsy clients, a status monitor and a map. They both get the device and call Start() on startup, and Stop() on exit. This seems reasonable.
However, if I quit one and leave the other running, the device has been stopped. The start/stop calls should manipulate a counter, so the device is only stopped when there is nobody listening.
After thinking about this issue there is one particular use case that needs to be considered. An application wishes to validly stop a device to change configuration i.e to switch the baud rate on a serial device from 4800 to 9600, any reference counting would not allow this to happen.
If an application wishes to stop the device to change configuration should there be a "Restart" method that allows the device to be stopped and started to handle configuration changes?
In a sane world applications wouldn't be configuring gypsy, but the GPS settings would be configuring gypsy.
Of course this isn't possible at the moment but I'd like to make it so. :) GSettings makes it a lot easier from a platform point of view.