[Rhythmbox-devel] Dbus getSongProperties



Hi,

I am writing a dbus client for Rhythmbox in C/C++.  There aren't much doc around on dbus-glib.  Still I managed to play/pause/next/previous, get signals but I can't get the song's information through getSongProperties.

Here is the code I use:
gchar * uri;
GHashTable * properties = g_hash_table_new_full (g_str_hash,
                        g_str_equal,
                        NULL,
                        NULL);
dbus_g_proxy_call (_player, "getPlayingUri", &error, G_TYPE_INVALID, G_TYPE_STRING,
    &uri, G_TYPE_INVALID);
dbus_g_proxy_call (_shell, "getSongProperties", &error, G_TYPE_STRING,
    uri, G_TYPE_INVALID,  dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
    properties, G_TYPE_INVALID);

The problem is that that properties is always empty.  In fact, calling g_hash_table_size(properties) segfault.   I checked with gdb and the pointer is not null ;) 

I'm not sure I'm correctly defining the GType for a{sv}.  I'd like your inputs on my problem.

Thanks!

Pierre-Luc Beaudoin





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