[glibmm] Gio::DBus*: More use of VariantContainerBase.



commit 0ad88fe0ee7c7e8c4324f7921155f587de5f4b78
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Mar 27 22:42:59 2011 +0200

    Gio::DBus*: More use of VariantContainerBase.
    
    	* gio/src/dbusconnection.hg:
    	* gio/src/dbusinterfacevtable.hg: Correct the documentation.
    	* gio/src/dbusproxy.[hg|cgg]: call(): Take a VariantContainerBase instead of
    	a VariantBase.
    	signal: Provide a VariantContainerBase instead of a VariantBase, though this
    	is not documented as necessarily being a tuple, though it is multiple
    	values.

 ChangeLog                      |   12 ++++++++++++
 gio/src/dbusconnection.hg      |    8 ++++----
 gio/src/dbusinterfacevtable.hg |    2 +-
 gio/src/dbusproxy.ccg          |    4 ++--
 gio/src/dbusproxy.hg           |   11 ++++++-----
 5 files changed, 25 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c1ab757..0b619c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2011-03-27  Murray Cumming  <murrayc murrayc com>
 
+	Gio::DBus*: More use of VariantContainerBase.
+
+	* gio/src/dbusconnection.hg: 
+	* gio/src/dbusinterfacevtable.hg: Correct the documentation.
+	* gio/src/dbusproxy.[hg|cgg]: call(): Take a VariantContainerBase instead of 
+	a VariantBase.
+	signal: Provide a VariantContainerBase instead of a VariantBase, though this 
+	is not documented as necessarily being a tuple, though it is multiple 
+	values.
+
+2011-03-27  Murray Cumming  <murrayc murrayc com>
+
 	Balanced Tree: Clean up the documentation.
 
 	* glib/src/balancedtree.hg: Use doxygen syntax.
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index f3d0b56..1295ec5 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -162,7 +162,7 @@ public:
    * void on_signal(const Glib::RefPtr<Connection>& connection, const
    * Glib::ustring& sender_name, const Glib::ustring& object_path, const
    * Glib::ustring& object_path, const Glib::ustring& interface_name, const
-   * Glib::ustring& signal_name, const Glib::VariantBase& parameters);.
+   * Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters);.
    * @endcode
    */
   typedef sigc::slot<void, const Glib::RefPtr<Connection>&,
@@ -636,7 +636,7 @@ public:
    * @param object_path Path of remote object.
    * @param interface_name D-Bus interface to invoke method on.
    * @param method_name The name of the method to invoke.
-   * @param parameters A Glib::VariantBase tuple with parameters for the
+   * @param parameters A Glib::VariantContainerBase tuple with parameters for the
    * method or <tt>0</tt> if not passing parameters.
    * @param slot A SlotAsyncReady to call when the request is satisfied.
    * @param cancellable A Cancellable.
@@ -705,7 +705,7 @@ public:
    * @param object_path Path of remote object.
    * @param interface_name D-Bus interface to invoke method on.
    * @param method_name The name of the method to invoke.
-   * @param parameters A Glib::VariantBase tuple with parameters for the
+   * @param parameters A Glib::VariantContainerBase tuple with parameters for the
    * method or <tt>0</tt> if not passing parameters.
    * @param cancellable A Cancellable.
    * @param bus_name A unique or well-known bus name or <tt>0</tt> if the
@@ -753,7 +753,7 @@ public:
    * @param signal_name The name of the signal to emit.
    * @param destination_bus_name The unique bus name for the destination for
    * the signal or <tt>0</tt> to emit to all listeners.
-   * @param parameters A Glib::VariantBase tuple with parameters for the
+   * @param parameters A Glib::VariantContainerBase tuple with parameters for the
    * signal or <tt>0</tt> if not passing parameters.
    * @throw Glib::Error.
    * @newin{2,28}
diff --git a/gio/src/dbusinterfacevtable.hg b/gio/src/dbusinterfacevtable.hg
index a572af7..c17e82f 100644
--- a/gio/src/dbusinterfacevtable.hg
+++ b/gio/src/dbusinterfacevtable.hg
@@ -58,7 +58,7 @@ public:
    * void on_interface_method_call(const Glib::RefPtr<Gio::DBus::Connection>&
    * connection, const Glib::ustring& sender, const Glib::ustring&
    * object_path, const Glib::ustring& interface_name, const Glib::ustring&
-   * method_name, const Glib::VariantBase& parameters, const
+   * method_name, const Glib::VariantContainerBase& parameters, const
    * Glib::RefPtr<Gio::DBus::MethodInvocation>& invocation);
    * @endcode
    */
diff --git a/gio/src/dbusproxy.ccg b/gio/src/dbusproxy.ccg
index 532e1a1..e18d1a4 100644
--- a/gio/src/dbusproxy.ccg
+++ b/gio/src/dbusproxy.ccg
@@ -285,7 +285,7 @@ void Proxy::get_cached_property(Glib::VariantBase& property,
 void Proxy::call(const Glib::ustring& method_name,
   const SlotAsyncReady& slot,
   const Glib::RefPtr<Cancellable>& cancellable,
-  const Glib::VariantBase& parameters,
+  const Glib::VariantContainerBase& parameters,
   int timeout_msec,
   CallFlags flags
 )
@@ -303,7 +303,7 @@ void Proxy::call(const Glib::ustring& method_name,
 
 void Proxy::call(const Glib::ustring& method_name,
   const SlotAsyncReady& slot,
-  const Glib::VariantBase& parameters,
+  const Glib::VariantContainerBase& parameters,
   int timeout_msec,
   CallFlags flags
 )
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg
index 5dc32fd..30125b5 100644
--- a/gio/src/dbusproxy.hg
+++ b/gio/src/dbusproxy.hg
@@ -265,7 +265,7 @@ public:
     const Glib::ustring& method_name,
     const SlotAsyncReady& slot,
     const Glib::RefPtr<Cancellable>& cancellable,
-    const Glib::VariantBase& parameters = Glib::VariantBase(),
+    const Glib::VariantContainerBase& parameters = Glib::VariantContainerBase(),
     int timeout_msec = -1,
     CallFlags flags = Gio::DBus::CALL_FLAGS_NONE
   );
@@ -274,7 +274,7 @@ public:
   void call(
     const Glib::ustring& method_name,
     const SlotAsyncReady& slot,
-    const Glib::VariantBase& parameters = Glib::VariantBase(),
+    const Glib::VariantContainerBase& parameters = Glib::VariantContainerBase(),
     int timeout_msec = -1,
     CallFlags flags = Gio::DBus::CALL_FLAGS_NONE
   );
@@ -296,7 +296,7 @@ public:
    * @param timeout_msec The timeout in milliseconds or -1 to use the proxy
    * default timeout.
    * @param flags Flags from the CallFlags enumeration.
-   * @param parameters A Glib::VariantBase tuple with parameters for the
+   * @param parameters A Glib::VariantContainerBase tuple with parameters for the
    * signal.
    * @param cancellable A Cancellable.
    * @result A Variant tuple with return values.
@@ -339,8 +339,9 @@ public:
   #m4 _CONVERSION(`const gchar*const*', `const std::vector<Glib::ustring>&', `Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_NONE)')
   _WRAP_SIGNAL(void properties_changed(const type_map_changed_properties& changed_properties, const std::vector<Glib::ustring>& invalidated_properties), "g-properties-changed")
 
-#m4 _CONVERSION(`GVariant*', `const Glib::VariantBase&', `Glib::wrap($3, true)')
- _WRAP_SIGNAL(void signal(const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantBase& parameters), "g-signal")
+#m4 _CONVERSION(`GVariant*', `const Glib::VariantContainerBase&', `Glib::VariantContainerBase($3, true)')
+#m4 _CONVERSION(`const Glib::VariantContainerBase&', `GVariant*', `const_cast<GVariant*>(($3).gobj())')
+ _WRAP_SIGNAL(void signal(const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters), "g-signal")
 };
 
 } //namespace



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