Getting items in a GVariant representing a tuple containing a string array

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

 



Hi,

I understand that to obtain items in a GVariant tuple, say of type
"(ub)" you would do this:

  guint32 u;
  gboolean b;
  g_variant_get(variant, "(ub)", &u, &b);

And with a GVariant which contains a null-terminated string array of
type "as" you would do this:

  GVariantIter *iter;
  gchar *str;
  g_variant_get(variant, "as", &iter);
  while (g_variant_iter_loop(iter, "s", &str))
    [ ... do something with str ... ]
  g_variant_iter_free(iter);

However, how would you get at the strings in the array if the array
were held in a tuple, of type "(as)"?

I need to do this as the tuple is received from a dbus method using
gio's dbus implementation.

Chris


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux