diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-03-16 11:56:12 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-03-16 11:56:12 +0100 |
commit | bd75c1313d17fcc99047b19cdbd18f42eff41518 (patch) | |
tree | 447264fb8aa4b726f88da16bc5e85b73b74b04d9 | |
parent | 463849a5678c2c2919a16ce5de51ee7326beab60 (diff) | |
download | glibmm-bd75c1313d17fcc99047b19cdbd18f42eff41518.tar.gz |
Dbus::Proxy: properties_changed signal: Avoid namespace qualifiers in header.
* gio/src/dbusproxy.[h|ccg]: Add a typedef to the .ccg file to help the
compiler so we do not need the namespace qualifiers in the API.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gio/src/dbusproxy.ccg | 11 | ||||
-rw-r--r-- | gio/src/dbusproxy.hg | 15 |
3 files changed, 22 insertions, 11 deletions
@@ -1,3 +1,10 @@ +2011-03-16 Murray Cumming <murrayc@murrayc.com> + + Dbus::Proxy: properties_changed signal: Avoid namespace qualifiers in header. + + * gio/src/dbusproxy.[h|ccg]: Add a typedef to the .ccg file to help the + compiler so we do not need the namespace qualifiers in the API. + 2011-03-16 Yannick Guesnet <Yannick.Guesnet@univ-rouen.fr> DBus::Proxy: Added signal properties_changed diff --git a/gio/src/dbusproxy.ccg b/gio/src/dbusproxy.ccg index 612a77b8..cb6d8acc 100644 --- a/gio/src/dbusproxy.ccg +++ b/gio/src/dbusproxy.ccg @@ -29,6 +29,9 @@ namespace Gio namespace DBus { +//Help the generate code: +typedef Proxy::type_map_changed_properties type_map_changed_properties; + Proxy::Proxy(const Glib::RefPtr<Connection>& connection, const Glib::ustring& name, const Glib::ustring& object_path, @@ -332,7 +335,7 @@ void Proxy::call_finish(Glib::VariantBase& ret, const Glib::RefPtr<AsyncResult>& void Proxy::call_sync(Glib::VariantBase& result, const Glib::ustring& method_name, const Glib::RefPtr<Cancellable>& cancellable, - const Glib::VariantBase& parameters, + const Glib::VariantBase& parameters, int timeout_msec, CallFlags flags ) @@ -340,7 +343,7 @@ void Proxy::call_sync(Glib::VariantBase& result, GError* g_error = 0; GVariant* const g_variant = - g_dbus_proxy_call_sync(gobj(), method_name.c_str(), + g_dbus_proxy_call_sync(gobj(), method_name.c_str(), const_cast<GVariant*>(parameters.gobj()), static_cast<GDBusCallFlags>(flags), timeout_msec, Glib::unwrap(cancellable), &g_error); @@ -354,7 +357,7 @@ void Proxy::call_sync(Glib::VariantBase& result, void Proxy::call_sync( Glib::VariantBase& result, const Glib::ustring& method_name, - const Glib::VariantBase& parameters, + const Glib::VariantBase& parameters, int timeout_msec, CallFlags flags ) @@ -362,7 +365,7 @@ void Proxy::call_sync( GError* g_error = 0; GVariant* const g_variant = - g_dbus_proxy_call_sync(gobj(), method_name.c_str(), + g_dbus_proxy_call_sync(gobj(), method_name.c_str(), const_cast<GVariant*>(parameters.gobj()), static_cast<GDBusCallFlags>(flags), timeout_msec, 0, &g_error); diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg index 01333aab..9010a91b 100644 --- a/gio/src/dbusproxy.hg +++ b/gio/src/dbusproxy.hg @@ -333,13 +333,14 @@ public: _WRAP_PROPERTY("g-name-owner", Glib::ustring) _WRAP_PROPERTY("g-object-path", Glib::ustring) -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") + typedef std::map<Glib::ustring, Glib::VariantBase> type_map_changed_properties; + + // The DBus API ensures that the variant changed_properties is of type "DICT<STRING,VARIANT>" + #m4 _CONVERSION(`GVariant*', `const type_map_changed_properties&', `Glib::Variant<type_map_changed_properties>($3, true).get()') + #m4 _CONVERSION(`const type_map_changed_properties&', `GVariant*', `const_cast<GVariant*>(Glib::Variant<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 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") |