Vala bindings for NetworkManager

As part of my current duties at Canonical I have to deal a lot with different parts of the Linux middleware stack. GSettings, dconf, PulseAudio…

Most of what I do these days is Vala and C (preferably Vala) and once I started dealing with NetworkManager I noticed the lack of Vala bindings for the GObject wrappers. My first reaction was to just write the whole thing in C but eventually I figured the whole thing was easier to maintain if I just took a week to write the bindings.

After a few bug fixes upstream in Vala and NetworkManager, the Vala bindings are now part of NetworkManager upstream.

Here's an example on how to get all driver names for each device:

using NM;
static int main (string[] args)
var client = new NM.Client();
var devices = client.get_devices ();
for (uint i = 0; i < devices.length; i++)
message ("%s", devices.get(i).driver);
return 0;

Bug reports and patches are more than welcome! Please, give the bindings  a try as well, they could use some real world testing.

The latest tarballs already include them, I expect them to land in Ubuntu Quantal soon, make sure to file bugs against OpenSUSE and Fedora and other distros if the packages are not deploying the bindings yet.

I would like to thank Jens Georg (phako), Juerg Billeter (juergbi) and Dan Williams (dcbw) for the help debugging issues, reviewing patches and other guidance.

Happy hacking!


8 thoughts on “Vala bindings for NetworkManager

  1. “you can’t be working for canonical since you contributed upstream with code”
    I wonder where are all those people that complain about the lack of upstream updates from canonical.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s