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 581801 - Add GIR/typelib for libnm-util.
Add GIR/typelib for libnm-util.
Status: RESOLVED WONTFIX
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on: 581685
Blocks:
 
 
Reported: 2009-05-07 22:36 UTC by C. Scott Ananian
Modified: 2015-02-07 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Add-GIR-typelib-for-libnm-util.patch (9.25 KB, patch)
2009-05-07 22:36 UTC, C. Scott Ananian
accepted-commit_now Details | Review
Add-GIR-typelib-for-libnm-util.patch (9.07 KB, patch)
2009-05-20 15:02 UTC, C. Scott Ananian
none Details | Review

Description C. Scott Ananian 2009-05-07 22:36:14 UTC
This patch is against the gir-repository module.

It builds a GIR typelib for libnm-util.
    
We fix some transfer modes and add helpers for nm_setting_vpn_add_secret(), nm_setting_enumerate_values, and nm_setting_enumerate_values (so that they take a GClosure). We also ensure that register_default_settings() is called, even though bindings might not call the nm_connection_new() constructor.
Comment 1 C. Scott Ananian 2009-05-07 22:36:44 UTC
Created attachment 134228 [details] [review]
0001-Add-GIR-typelib-for-libnm-util.patch
Comment 2 Johan (not receiving bugmail) Dahlin 2009-05-08 01:54:49 UTC
Comment on attachment 134228 [details] [review]
0001-Add-GIR-typelib-for-libnm-util.patch

This looks quite good to me, but I am not a dbus expert.
Comment 3 Johan Bilien 2009-05-12 17:14:08 UTC
This doesn't build on my system:

./NMUtil-custom.c: In function ‘nm_setting_vpn_add_secret’:
./NMUtil-custom.c:58: error: ‘NMSettingVPN’ has no member named ‘secrets’
./NMUtil-custom.c: In function ‘nm_setting_enumerate_values_with_closure’:
./NMUtil-custom.c:103: warning: passing argument 2 of ‘nm_setting_enumerate_values’ from incompatible pointer type
./NMUtil-custom.c: In function ‘nm_connection_for_each_setting_value_with_closure’:
./NMUtil-custom.c:115: warning: passing argument 2 of ‘nm_connection_for_each_setting_value’ from incompatible pointer type

I have network-manager 0.7.1

NMSettingVPN is defined as

typedef struct {
↦       NMSetting parent;
} NMSettingVPN;

typedef struct {
↦       NMSettingClass parent;
} NMSettingVPNClass;
Comment 4 C. Scott Ananian 2009-05-20 14:59:22 UTC
Johan: Oh, huh --
  http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/libnm-util/nm-setting-vpn.h#n87

shows that NM upstream has added exactly the nm_setting_vpn_add_secret method I was adding here.  I'll attach a patch without this function, since you'll get it for free with NM 0.7.1.
Comment 5 C. Scott Ananian 2009-05-20 15:02:24 UTC
Created attachment 135026 [details] [review]
Add-GIR-typelib-for-libnm-util.patch
Comment 6 Johan (not receiving bugmail) Dahlin 2009-05-27 17:28:30 UTC
Comment on attachment 135026 [details] [review]
Add-GIR-typelib-for-libnm-util.patch

Looks good, assuming it builds for Johan
Comment 7 Johan Bilien 2009-05-27 19:53:00 UTC
(In reply to comment #6)
> (From update of attachment 135026 [details] [review] [edit])
> Looks good, assuming it builds for Johan
> 

Yes builds fine, after applying bug# 581685 to g-i
Comment 8 C. Scott Ananian 2009-05-27 19:54:36 UTC
The annotations on nm_connection_new_from_hash and
nm_connection_replace_settings and nm_connection_to_hash depend on bug 581685
(parameterized type support in annotations); otherwise you get:
 ERROR:girnode.c:1409:g_ir_node_build_typelib: assertion failed: (node != NULL)
when g-object-introspection fails to parse the element-type annotation.
Comment 9 C. Scott Ananian 2009-06-12 16:58:04 UTC
OK, bug 581685 has been landed, so this patch should be good to go, I guess.
Comment 10 Johan (not receiving bugmail) Dahlin 2010-09-06 04:23:27 UTC
We will not add gir/typelib generation for more libraries to gir-repository, instead they should go into the upstream package instead.
Comment 11 André Klapper 2015-02-07 17:00:13 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]