After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794376 - Add GeoClue2 VAPI
Add GeoClue2 VAPI
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: Extra
unspecified
Other Linux
: Normal normal
: 0.40
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-15 20:25 UTC by Daniel Fore
Modified: 2018-03-19 06:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vapi: Add libgeoclue-2.0 bindings (11.98 KB, patch)
2018-03-15 20:45 UTC, Rico Tzschichholz
committed Details | Review

Description Daniel Fore 2018-03-15 20:25:52 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
Comment 1 Rico Tzschichholz 2018-03-15 20:45:21 UTC
Created attachment 369753 [details] [review]
vapi: Add libgeoclue-2.0 bindings
Comment 2 Al Thomas 2018-03-15 21:28:16 UTC
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.
Comment 3 Rico Tzschichholz 2018-03-17 09:39:23 UTC
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.
Comment 4 Rico Tzschichholz 2018-03-19 06:50:53 UTC
Attachment 369753 [details] pushed as c7d5a91 - vapi: Add libgeoclue-2.0 bindings