diff options
Diffstat (limited to 'client/src/dbus/networkmanager.vala')
-rw-r--r-- | client/src/dbus/networkmanager.vala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/client/src/dbus/networkmanager.vala b/client/src/dbus/networkmanager.vala new file mode 100644 index 00000000..fb8ac0cc --- /dev/null +++ b/client/src/dbus/networkmanager.vala @@ -0,0 +1,22 @@ +namespace Dino { + +[DBus (name = "org.freedesktop.NetworkManager")] +public interface NetworkManager : Object { + + public const int CONNECTED_GLOBAL = 70; + + public abstract uint32 State {owned get;} + public signal void StateChanged(uint32 state); +} + +public static NetworkManager? get_network_manager() { + NetworkManager? nm = null; + try { + nm = Bus.get_proxy_sync(BusType.SYSTEM, "org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager"); + } catch (IOError e) { + stderr.printf ("%s\n", e.message); + } + return nm; +} + +}
\ No newline at end of file |