connectivity-api
Using the C++ API

Install the development headers:

sudo apt-get install libconnectivity-qt1-dev

Enable c++11 and use pkg-config to get the necessary compilation flags:

$ g++ myapp.cpp -std=c++11 `pkg-config --cflags --libs connectivity-qt1` -o myapp

The headers can then be included as:

// includes the ubuntu::connectivity::NetworkingStatus class

note:
Accessing the networking status from confined applications requires the connectivity policy group.