[Tracker] libtracker-sparql & gobject-introspection
- From: Ivan Frade <ivan frade gmail com>
- To: Tracker mailing list <tracker-list gnome org>
- Subject: [Tracker] libtracker-sparql & gobject-introspection
- Date: Wed, 2 Mar 2011 15:31:40 +0200
Hi,
I have been trying to enable gobject-introspection in our libraries,
starting with libtracker-sparql. It is not so easy as it looks. I got
stuck and some help would be appreciated.
The theory is easy:
#1 generate a .gir file describing the UI from the source code
#2 compile the .gir into a .typelib with g-ir-compiler
#3 put everything in the right locations
I tried two options:
Option 1: Using the valac --gir options (so valac generates the gir).
It spits some errors in the generation, but it generates a .gir. That
gir doesn't compile into typelib. The problem seems to be with a
va_list parameter:
$ /opt/gnome/bin/g-ir-compiler --shared-library=tracker-sparql-0.10 -o
TrackerSparql-1.0.typelib TrackerSparql-1.0.gir
...
TrackerSparql-1.0.gir:-1: In sparql_escape_uri_vprintf.args.: error:
type reference 'va_list' not found
I read multiple times the .gir, i checked the .gir of other libraries
using va_list parameters and i cannot see any difference.
Option 2: I tried to build the .gir from the .c files generated from
vala, using the standard procedure documented in
gobject-introspection. Things got a bit better here: .gir is
generated, .typelib is compiled and i can even load if from python.
But the content is mostly useless.
There is a class in the .gir:
<class name="SparqlConnection" c:type="TrackerSparqlConnection"
glib:type-name="TrackerSparqlConnection"
glib:get-type="tracker_sparql_connection_get_type"
glib:type-struct="ConnectionClass" parent="GObject.Object"
abstract="1">
But it is not visible in python (other classes in the gir are
available). Could this be a problem in the compiler? in valac
generating the gir?
Some help is welcome. I pushed my experiment in the g-i branch in the
repository.
Regards,
Ivan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]