Retrieving the Array of strings

John (J5) Palmieri johnp at redhat.com
Thu Jan 11 10:12:43 PST 2007


> ------------ Receiving part -----------------
> 
>         DBusMessageIter iter, array_iter_read, struct_iter_read;
> 
>         dbus_message_iter_init(msg, &iter);
>         dbus_message_iter_get_basic(&iter, &num_elem);
>         printf("\n\nNumber of apps:%d\n",num_elem);
>         dbus_message_iter_next(&iter);
> 
>         printf("\n%s\n",dbus_message_iter_get_signature(&iter));
> 
>         dbus_message_iter_recurse(&iter, &array_iter_read);
> 
>         for (i = 0; i < num_elem; i++) {
>                 dbus_message_iter_recurse(&array_iter_read, 
> &struct_iter_read);
>                 dbus_message_iter_get_basic(&struct_iter_read, &appname);
>                 dbus_message_iter_next(&struct_iter_read);
>                 dbus_message_iter_get_basic(&struct_iter_read, &apptitle);
>                 printf("read :(%s, %s)\n", appname, apptitle);
>                 dbus_message_iter_next(&array_iter_read);
>         }

How are you defining appname and apptitle?

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list