GNOME Bugzilla – Bug 794376
Add GeoClue2 VAPI
Last modified: 2018-03-19 06:51:06 UTC
Currently there's a few projects shipping custom VAPIs for GeoClue2: * https://github.com/GNOME/gnome-clocks/blob/master/src/libgeoclue-2.0.vapi * https://github.com/elementary/pantheon-agent-geoclue2/blob/master/vapi/geoclue2.vapi * https://github.com/danrabbit/nimbus/blob/master/vapi/libgeoclue-2.0.vapi There are also some Vala projects that I would love to suggest that they use GeoClue2 instead of ie Mozilla location services with Soup. But right now it's not convenient for them and there are no docs available on Valadoc.org (which as I understand we need a package with the VAPI for this). It would be nice if we could get the GeoClue2 VAPI available here for existing Vala projects to use the upstream VAPI and to make it convenient for new Vala projects to use system location services
Created attachment 369753 [details] [review] vapi: Add libgeoclue-2.0 bindings
FWIW GeoClue is a D-Bus service (https://www.freedesktop.org/wiki/Software/GeoClue/). It does provide D-Bus object introspection files. e.g. on my distro it is /usr/share/dbus-1/interfaces/org.freedesktop.GeoClue2.xml https://github.com/freesmartphone/vala-dbus-binding-tool could be used to generate Vala D-Bus interfaces, instead of a VAPI. Is this API an ideal use case for Vala's D-Bus bindings? Maybe a Wiki page with a sample of the D-Bus API being used is an alternative to carrying these bindings in the mainline repo.
Suggesting to use the plain DBus interface is fine. But if there is dedicated client library which already provides a simplified access including error handling and the like I would prefer to use that. In case of geoclue it is the GClue.Simple class.
Attachment 369753 [details] pushed as c7d5a91 - vapi: Add libgeoclue-2.0 bindings