Ubuntu Connectivity API offers a way to access the connectivity related information of the system. Qt C++ API version of this API also exists (see the C++ documentation).
import Ubuntu.Connectivity 1.0
Overall system networking status
If you find any problems with the or this documentation, please file a bug in Connectivity API href="https://bugs.launchpad.net/connectivity-api">Launchpad page.