[PyQt] SIP first use questions

Linos info at linos.es
Thu Jul 21 12:41:32 BST 2011

	i am trying to do my first library wrapper to the libfprint c lib 
(http://www.freedesktop.org/wiki/Software/fprint/libfprint) using SIP, i have 
any doubts, sorry if any or all of them are pretty obvious but i develop nearly 
ever on python, a bit on Qt C++ so all of this it is a bit strange for me.

1- How should i wrap this function from fprint.h?

	struct fp_dscv_print **fp_discover_prints();
      I get this info from sip "sip: fp_discover_devs() unsupported function 
return type - provide %MethodCode and a C signature" I have read in the 
documentation the examples about %AccessCode and %MethodCode but i don't 
understand how to use here.

2- How should i wrap a static inline function defined in fprint.h like this:

static inline int fp_enroll_finger(struct fp_dev *dev,
	struct fp_print_data **print_data)
	return fp_enroll_finger_img(dev, print_data, NULL);

3- i had to define all the include dirs manually with:

makefile.extra_include_dirs = ["/tmp/libfprint-0.4.0", 
"/tmp/libfprint-0.4.0/libfprint", "/usr/include/glib-1.2", 
"/usr/lib/glib/include", "/usr/include/libusb-1.0"]

I am pretty sure that should be a much better way to do this but i can't find how.

Miguel Angel.

More information about the PyQt mailing list