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 605465 - PolicyKit bindings for vala
PolicyKit bindings for vala
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.7.x
Other Linux
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 605464
Blocks:
 
 
Reported: 2009-12-26 06:48 UTC by Jonathan Conder
Modified: 2016-09-19 09:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Input files to vala-gen-introspect, along with .gi and .vapi files (8.79 KB, application/x-gzip)
2009-12-26 06:48 UTC, Jonathan Conder
Details
Input files to vala-gen-introspect and vapigen (9.30 KB, application/x-gzip)
2009-12-26 07:19 UTC, Jonathan Conder
Details
Input files to vala-gen-introspect and vapigen (9.84 KB, application/x-gzip)
2009-12-26 11:29 UTC, Jonathan Conder
Details

Description Jonathan Conder 2009-12-26 06:48:02 UTC
Created attachment 150390 [details]
Input files to vala-gen-introspect, along with .gi and .vapi files

Hi, I have prepared some vala bindings for PolicyKit. All the files I created/generated are in the attached tarball. Note that the following two bugs will have to be resolved before generating these will work:

https://bugzilla.gnome.org/show_bug.cgi?id=605464
https://bugs.freedesktop.org/show_bug.cgi?id=25798

The patches for those bugs can be easily applied without recompiling anything if the bindings need to be regenerated (which is quite likely as PolicyKit isn't API stable).

I'm not terribly familiar with vala bindings generation so there are probably a lot of issues with the results (for example, there are a lot of *Class classes that shouldn't be there). I will try to fix these as I find them with metadata files.

Also, one thing not included is the arguments I passed to vapigen to get the .vapi files, because I'm not sure where they should be recorded. However, most of the required packages are easy to deduce from the error messages, I think the only ones I used were gio-2.0, gtk+-2.0 and polkit-gobject-1 (which is part of these bindings).
Comment 1 Jonathan Conder 2009-12-26 07:19:12 UTC
Created attachment 150393 [details]
Input files to vala-gen-introspect and vapigen

I figured out where to put the arguments to vapigen (in a .deps file), although "--vapidir ." is still required for polkit-agent-1 and polkit-backend-1. I also changed the header filenames, which were wrong, to get my project to compile. New tarball is attached.
Comment 2 Jonathan Conder 2009-12-26 11:29:09 UTC
Created attachment 150395 [details]
Input files to vala-gen-introspect and vapigen

I went through the PolicyKit documentation to work out which variables were nullable, unowned, etc and changed these where applicable. There still may be some missing as the documentation is relatively sparse.

I also marked async methods as async, except for one which is a constructor. I don't know if async constructors are supposed to work but if not I could always move it to a static method or something.
Comment 3 Evan Nemerson 2010-02-12 10:56:09 UTC
Looks good, thanks.

As soon as the f.d.o bug gets fixed I'll go over the polkit-agent-1 and polkit-backend-1 bindings a bit more carefully, then add them to the repository. The GTK+ one will have to wait for both bugs to be fixed.

I'll try to keep an eye out, but feel free to poke me when those bugs get fixed.
Comment 4 Jonathan Conder 2010-08-16 11:31:45 UTC
Hi, I just thought you should know the fd.o bug is fixed now:
https://bugs.freedesktop.org/show_bug.cgi?id=25798

However, I am not using the bindings anymore, so I'm not sure there's much point going forward until someone else wants to use PolicyKit from Vala. Also, the API seems to have changed a bit since I wrote the bindings. I wouldn't mind updating them myself if someone wanted to use them, but otherwise I think it would just be an unnecessary burden.

Thanks for your time, and feel free to close this if you want.
Comment 5 Rico Tzschichholz 2016-09-19 09:42:48 UTC
c87fb9725d8f7d32d0d7c5bd898bd0de9b59b6fa
vapi: Add PolicyKit bindings, polkit-agent-1 and polkit-gobject-1