GObject introspection



Hi,

I tried to modernise the introspection integration in GSSDP to fix some
of the warnings that the g-ir-scanner showed. 

After some discussion on IRC it looks like that this modernisation is
desperately needed, i.e. with current introspection, all constructors
seem to miss their parameters and thus make it nearly unusable in e.g.
PyGI. Testing showed that the work I did in my merge-request [1] fixed
that.

So I tried the same for GUPnP and ran into a problem:

The DeviceInfo has two vfuncs. get_device and get_service, to get a
device and a service from an XML element. Additionally, it also has two
"normal" functions with the same name, but taking a const char* as
second parameter. This confuses the hell out out the gir scanner, makes
it impossible to introspect the second version and tbh I don't think
it's nice API either.

Any ideas on how to clean up that situation?

I'd suggest to rename gupnp_device_info_get_service/_get_device to
gupnp_device_info_get_service_by_type/_get_device_by_type and make the
original ones to convenience wrappers for the vfuncs, which is IIRC a
standard GObject convention.

Of course this will break ABI and API, so probably not a nice thing to
do :-/

Regards,
	Jens.

[1] https://gitorious.org/gupnp/gssdp/merge_requests/5



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]