aboutsummaryrefslogtreecommitdiff
path: root/client/src/dbus/networkmanager.vala
blob: fb8ac0cccb18b291487758085dce11b09e2f78f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}

}