Dear all, I need some guidance from those who know more about the direction Gnome's GIO is going and how that affects those of us who develop programs that use libgphoto2 directly. It seems something quite important is afoot in the way GIO names paths, with important implications for program developers using libgphoto2.
In years past, the root path of a GIO camera mount included the port. That was very useful, as it meant that one could use the port information provided by libgphoto2 to query GIO for the matching GIO mount simply by going through the list of GIO's volume monitor's mounts and parsing each mount's root path until one found a match. Arguably this was a hack, but it worked. One can then do important things like requesting GIO unmount the mount so that one's own program can gain control of the PTP connection. (If you don't auto-unmount it, your users will assume your program is broken because it cannot access the device and they will rate your lovingly crafted program 1 star. Delightful.) Recently the GIO mount no longer includes the port. The port has been replaced by a device name in combination with what I assume is a serial number of some kind if it is available (I didn't pay much attention). As a workaround, it is possible to query the port information from GIO by getting the mount's volume and querying its identifier using g_volume_get_identifier () [1] by passing it the Unix identifier [2]. That way you get the port for the device, which matches the port reported by libgphoto2. However, the GIO developers have marked the Unix identifier as "deprecated and should not be used in newly-written code." Which to me indicates they're possibly planning to simply end identification of devices using the port. If my interpretation of GIO's changes is correction, what does that mean for us developers who use libgphoto2? Has libgphoto2 already anticipated this GIO change and added new options for device identification that we developers should now use? Thanks, Damon [1] https://developer.gnome.org/gio/stable/GVolume.html#g-volume-get-identifier [2] https://developer.gnome.org/gio/stable/GVolume.html#G-VOLUME-IDENTIFIER-KIND-UNIX-DEVICE:CAPS -- http://www.damonlynch.net
_______________________________________________ Gphoto-devel mailing list Gphoto-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gphoto-devel