diff options
author | Yannick Guesnet <yannick.guesnet@univ-rouen.fr> | 2011-03-16 08:28:59 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-03-16 11:52:28 +0100 |
commit | 463849a5678c2c2919a16ce5de51ee7326beab60 (patch) | |
tree | 2aaa9cfc29bce09a11359b997cf6f4cfb48b34d6 | |
parent | 279a4cab863534db3a830e0980d2301cdbda3d51 (diff) | |
download | glibmm-463849a5678c2c2919a16ce5de51ee7326beab60.tar.gz |
DBus::Proxy: Added signal properties_changed
* gio/src/dbusproxy.hg: Add signal properties_changed.
* gio/src/gio_signals.defs: Change the type of a parameter of
signal g-properties-changed from "GStrv" to
"const gchar * const *" to match the signal declaration.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | gio/src/dbusproxy.hg | 14 | ||||
-rw-r--r-- | gio/src/gio_signals.defs | 6 |
3 files changed, 22 insertions, 7 deletions
@@ -1,3 +1,12 @@ +2011-03-16 Yannick Guesnet <Yannick.Guesnet@univ-rouen.fr> + + DBus::Proxy: Added signal properties_changed + + * gio/src/dbusproxy.hg: Add signal properties_changed. + * gio/src/gio_signals.defs: Change the type of a parameter of + signal g-properties-changed from "GStrv" to + "const gchar * const *" to match the signal declaration. + 2011-03-16 Murray Cumming <murrayc@murrayc.com> Gio::Variant: Use _WRAP_METHOD() instead of hand-coding. diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg index 673e354b..01333aab 100644 --- a/gio/src/dbusproxy.hg +++ b/gio/src/dbusproxy.hg @@ -333,13 +333,15 @@ public: _WRAP_PROPERTY("g-name-owner", Glib::ustring) _WRAP_PROPERTY("g-object-path", Glib::ustring) -#m4 _CONVERSION(`GVariant*', `const Glib::VariantBase&', `Glib::wrap($3, true)') - - //TODO: It's difficult to figure out conversions from/to GStrv (gchar**) - //to/from std::vector<Glib::ustring> -//#m4 _CONVERSION(`GStrv', `const std::vector<Glib::ustring>&', `std::vector<Glib::ustring>($3, $3 + g_strv_length($3))') - //_WRAP_SIGNAL(void properties_changed(const Glib::VariantBase& changed_properties, const std::vector<Glib::ustring>& invalidated_properties), "g-properties-changed") +typedef std::map<Glib::ustring,Glib::VariantBase> type_map_changed_properties; +// The BDus API ensures that the variant changed_properties is of type "DICT<STRING,VARIANT>" +#m4 _CONVERSION(`GVariant*', `const Gio::DBus::Proxy::type_map_changed_properties&', `Glib::Variant<Gio::DBus::Proxy::type_map_changed_properties>($3, true).get()') +#m4 _CONVERSION(`const Gio::DBus::Proxy::type_map_changed_properties&', `GVariant*', `const_cast<GVariant*>(Glib::Variant<Gio::DBus::Proxy::type_map_changed_properties>::create($3).gobj())') +#m4 _CONVERSION(`const std::vector<Glib::ustring>&', `const gchar*const*',`Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data()') +#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 Gio::DBus::Proxy::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") }; diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs index 2bc8860c..7b45139c 100644 --- a/gio/src/gio_signals.defs +++ b/gio/src/gio_signals.defs @@ -1847,13 +1847,17 @@ ;; From GDBusProxy +;; p1 is actually a GStrv, +;; but that is equivalent (by typedef) to gchar**, +;; and the declaration in gdbusproxy.h add consts. +;; yannickg (define-signal g-properties-changed (of-object "GDBusProxy") (return-type "void") (when "last") (parameters '("GVariant*" "p0") - '("GStrv" "p1") + '("const-gchar*const*" "p1") ) ) |