2 #include <glib-object.h>
3 #include <dbus/dbus-glib.h>
5 int main (int argc
, char **argv
)
8 DBusGConnection
*connection
;
10 char **names
, **paths
= NULL
;
17 connection
= dbus_g_bus_get (DBUS_BUS_SESSION
, &error
);
19 g_warning ("Error getting connection to the bus");
23 proxy
= dbus_g_proxy_new_for_name (connection
,
24 "org.gnome.MediaManager",
25 "/org/gnome/MediaManager/Manager",
26 "org.gnome.MediaManager.Manager");
28 g_warning ("Error creating proxy");
32 res
= dbus_g_proxy_call (proxy
,
33 "GetRegisteredApps", &error
,
41 g_warning ("error while calling GetRegisteredApps %s", error
->message
);
46 for (i
= 0; i
< G_N_ELEMENTS (names
); i
++) {
47 g_print ("app: %s on path %s\n", names
[i
], paths
[i
]);