diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-03-25 10:29:03 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-03-25 10:29:03 +0100 |
commit | 19a97d1dec0068421d2c2a1478c53419d26a4132 (patch) | |
tree | 2a176941e1369d5401cd4b414d10a8d90abb29b0 /gio/src/dbusproxy.hg | |
parent | 98f6dce0e2fb23221f1490fa5f4a13bd1c349145 (diff) | |
download | glibmm-19a97d1dec0068421d2c2a1478c53419d26a4132.tar.gz |
Gio::DBus: Use VariantContainerBase for tuple Variants.
* gio/src/dbusconnection.[hg|ccg]:
* gio/src/dbusproxy.ccg.[hg|ccg]: call_sync(), call(), call_finish():
Use VariantContainerBase, instead of VariantBase, for GVariants that are
documented as being tuples. Because the type is known we can also use
it as a simple return type instead of an output parameter.
* tools/m4/convert_gio.m4: Added a necessary conversion.
* examples/dbus/peer.cc:
* examples/dbus/userbus.cc: Adapted. These already correctly assumed that
the type should be VariantContainerBase.
Diffstat (limited to 'gio/src/dbusproxy.hg')
-rw-r--r-- | gio/src/dbusproxy.hg | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg index 7924e262..5dc32fd1 100644 --- a/gio/src/dbusproxy.hg +++ b/gio/src/dbusproxy.hg @@ -281,19 +281,17 @@ public: /** Finishes an operation started with call(). * - * @param ret An output variable in which to store the return. * @param res An AsyncResult obtained from the SlotAsyncReady passed to * call(). + * @result A Variant tuple with return values. * * @throw Glib::Error. */ - void call_finish(Glib::VariantBase& ret, const Glib::RefPtr<AsyncResult>& res); - _IGNORE(g_dbus_proxy_call_finish) + _WRAP_METHOD(Glib::VariantContainerBase call_finish(const Glib::RefPtr<AsyncResult>& res), g_dbus_proxy_call_finish, errthrow) /** Synchronously invokes the method_name method on proxy. * See call(), the asynchronous version of this method for more information. * - * @param result An output parameter in which to store the return. * @param method_name Name of method to invoke. * @param timeout_msec The timeout in milliseconds or -1 to use the proxy * default timeout. @@ -301,24 +299,23 @@ public: * @param parameters A Glib::VariantBase tuple with parameters for the * signal. * @param cancellable A Cancellable. + * @result A Variant tuple with return values. * * @throw Glib::Error. */ - void call_sync( - Glib::VariantBase& result, + Glib::VariantContainerBase call_sync( const Glib::ustring& method_name, 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 ); _IGNORE(g_dbus_proxy_call_sync) /// A non-cancellable version of call_sync(). - void call_sync( - Glib::VariantBase& result, + Glib::VariantContainerBase call_sync( const Glib::ustring& method_name, - const Glib::VariantBase& parameters = Glib::VariantBase(), + const Glib::VariantContainerBase& parameters = Glib::VariantContainerBase(), int timeout_msec = -1, CallFlags flags = Gio::DBus::CALL_FLAGS_NONE ); |