Glib Dbus Types for object paths



Hello everybody,

I am developing an application using dbus to control Network Manager. The only problem I encounter is how to get the properties of type "- o -"

for example the property of 
org.freedesktop.NetworkManager.Connection.Active 
Connection - o - (read)
The path of the connection.

I use the glib library.

I tried 
if (!dbus_g_proxy_call (proxy_props, "Get", &error,
G_TYPE_STRING, "org.freedesktop.NetworkManager.Connection.Active",
G_TYPE_STRING, "Connection",
G_TYPE_INVALID,
                                        DBUS_TYPE_G_OBJECT_PATH, &conn,
G_TYPE_INVALID))
{
ERROR ("Error getting device's connection name : %s", error->message);
g_error_free (error);
}

Which through the error : Error getting device's connection name : Expected D-BUS object path, got type code 'v'

I replaced the DBUS_TYPE_G_OBJECT_PATH by G_TYPE_VALUE, the error disappear but I can't find the good g_value_get_xxx that can get me this value.

Does anyone has succeeded that ?

Many thanks

--
Maxime Bouré



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