summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2010-12-22 00:10:52 -0500
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2010-12-22 00:10:52 -0500
commit75b9136f81562ee898de1e220f196a93921cdffd (patch)
tree4766f20dfd698edca98e468e2dd3a08558355ff7 /examples
parentcac3585d825f96852df4a85e13f2143dda0d4239 (diff)
downloadglibmm-75b9136f81562ee898de1e220f196a93921cdffd.tar.gz
Variant< std::vector<std::string> >: Correct the getting of the array.
* glib/src/variant.{ccg,hg} (get): Use g_variant_get_bytestring_array() in the get() methods instead of g_variant_get_strv(). * examples/dbus/well-known-address-client.cc: Use a VariantContainerBase to get the result of the proxy's call method instead of a Variant<VariantBase>. Also corrected the comment about why it is done that way.
Diffstat (limited to 'examples')
-rw-r--r--examples/dbus/well-known-address-client.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/dbus/well-known-address-client.cc b/examples/dbus/well-known-address-client.cc
index 0db6447d..dc69dae8 100644
--- a/examples/dbus/well-known-address-client.cc
+++ b/examples/dbus/well-known-address-client.cc
@@ -46,13 +46,12 @@ void dbus_proxy_available(Glib::RefPtr<Gio::AsyncResult>& result)
try
{
- // The 'ListNames' method returns a single element tuple of string arrays
- // so first receive the tuple as a VariantBase container (that works fine
- // for now).
- Glib::Variant<Glib::VariantBase> result;
+ // The proxy's call method returns a tuple of the value(s) that the method
+ // call produces so just get the tuple as a VariantContainerBase.
+ Glib::VariantContainerBase result;
proxy->call_sync(result, "ListNames");
- // Now extract the single item in the VariantBase container which is the
+ // Now extract the single item in the variant container which is the
// array of strings (the names).
Glib::Variant< std::vector<Glib::ustring> > names_variant;
result.get(names_variant);