[Vala] Properties in DBus

How can I use DBus properties with vala? I've tried following:

-- code begin --

DBus.Connection con = DBus.Bus.get(DBus.BusType.SYSTEM);
dynamic DBus.Object nmIface = con.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager"); dynamic DBus.Object propIface = con.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.DBus.Properties");

DBus.ObjectPath[] activeConnections = propIface.Get("org.freedesktop.NetworkManager", "ActiveConnections");

-- code end --

But I get error:
Expected D-BUS array, got type code 'v'.

But NetworkManager dbus interface documentation (http://projects.gnome.org/NetworkManager/developers/spec.html#org.freedesktop.NetworkManager) says that it should be of type 'ao', therefore ObjectPath[]. But on the other hand, dbus documentation says that Get returns Variant, but there seems to be no DBus.Variant in Vala.

Or can I use vala's properties for this somehow?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]