[glibmm] Gio::DBus::InterfaceVTable: Make the tuple clearer.



commit 572f96865e23092a7d405760d1033e4b48c44fff
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 23 11:07:37 2011 +0100

    Gio::DBus::InterfaceVTable: Make the tuple clearer.
    
    * gio/src/dbusinterfacevtable.[hg|ccg]: SlotInterfaceMethodCall: Change
    the VariantBase type to a VariantContainerBase, because this is a tuple,
    so people should get the children. This makes it more obvious.
    DBusInterfaceVTable_MethodCall_giomm_callback(): Adapt.
    Suggested by Michael Edwards.

 ChangeLog                       |   10 ++++++++++
 gio/src/dbusinterfacevtable.ccg |    4 +++-
 gio/src/dbusinterfacevtable.hg  |    2 +-
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 661ca44..36363e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2011-03-23  Murray Cumming  <murrayc murrayc com>
 
+	Gio::DBus::InterfaceVTable: Make the tuple clearer.
+
+	* gio/src/dbusinterfacevtable.[hg|ccg]: SlotInterfaceMethodCall: Change
+	the VariantBase type to a VariantContainerBase, because this is a tuple,
+	so people should get the children. This makes it more obvious.
+	DBusInterfaceVTable_MethodCall_giomm_callback(): Adapt.
+	Suggested by Michael Edwards.
+
+2011-03-23  Murray Cumming  <murrayc murrayc com>
+
 	Gio::DBus: Move InterfaceVTable and SubtreeVTable to their own files.
 
 	* gio/src/dbusinterfacevtable.[hg|ccg]:
diff --git a/gio/src/dbusinterfacevtable.ccg b/gio/src/dbusinterfacevtable.ccg
index bf47870..4db46a2 100644
--- a/gio/src/dbusinterfacevtable.ccg
+++ b/gio/src/dbusinterfacevtable.ccg
@@ -44,9 +44,11 @@ static void DBusInterfaceVTable_MethodCall_giomm_callback(
 
   try
   {
+    // Note that we use VariantContainerBase instead of VariantBase for the
+    // GVariant, because it is documented as being a tuple (list of values).
     (*the_slot)(Glib::wrap(connection, true), (sender ? sender : ""),
       object_path, interface_name, method_name,
-      Glib::VariantBase(parameters, true), Glib::wrap(invocation, true));
+      Glib::VariantContainerBase(parameters, true), Glib::wrap(invocation, true));
   }
   catch(...)
   {
diff --git a/gio/src/dbusinterfacevtable.hg b/gio/src/dbusinterfacevtable.hg
index 5a49b01..a572af7 100644
--- a/gio/src/dbusinterfacevtable.hg
+++ b/gio/src/dbusinterfacevtable.hg
@@ -69,7 +69,7 @@ public:
     const Glib::ustring&,
     const Glib::ustring&,
     const Glib::ustring&,
-    const Glib::VariantBase&,
+    const Glib::VariantContainerBase&,
     const Glib::RefPtr<MethodInvocation>&
   > SlotInterfaceMethodCall;
 



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