diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-10-12 19:32:11 -0400 |
---|---|---|
committer | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-10-12 19:32:11 -0400 |
commit | 3859c6f40be85f1b3162cee5b637f2a67616066c (patch) | |
tree | acd946d1d66327209d594eea545cae7389c99a1c /gio/src/dbusconnection.hg | |
parent | 16c801c3b803c0963e57af58e13a3073e1537916 (diff) | |
download | glibmm-3859c6f40be85f1b3162cee5b637f2a67616066c.tar.gz |
Gio::DBus::Connection: Add UnixFDList call() method overloads.
* gio/src/dbusconnection.{ccg,hg}: Add cancellable and
non-cancellable UnixFDList call() methods.
Diffstat (limited to 'gio/src/dbusconnection.hg')
-rw-r--r-- | gio/src/dbusconnection.hg | 89 |
1 files changed, 85 insertions, 4 deletions
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg index f8424348..f17eafa8 100644 --- a/gio/src/dbusconnection.hg +++ b/gio/src/dbusconnection.hg @@ -49,6 +49,9 @@ _WRAP_ENUM(SubtreeFlags, GDBusSubtreeFlags, s#^DBUS_##, NO_GTYPE) _GMMPROC_EXTRA_NAMESPACE(DBus) +class UnixFDList; + + /** @defgroup DBus D-Bus API * * API to use D-Bus services as a client or to implement a D-Bus service. @@ -663,7 +666,7 @@ public: const Glib::RefPtr<Cancellable>& cancellable, const Glib::ustring& bus_name = Glib::ustring(), int timeout_msec = -1, - CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, + CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, const Glib::VariantType& reply_type = Glib::VariantType() ); _IGNORE(g_dbus_connection_call) @@ -677,7 +680,7 @@ public: const SlotAsyncReady& slot, const Glib::ustring& bus_name = Glib::ustring(), int timeout_msec = -1, - CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, + CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, const Glib::VariantType& reply_type = Glib::VariantType() ); @@ -732,7 +735,7 @@ public: const Glib::RefPtr<Cancellable>& cancellable, const Glib::ustring& bus_name = Glib::ustring(), int timeout_msec = -1, - CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, + CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, const Glib::VariantType& reply_type = Glib::VariantType() ); _IGNORE(g_dbus_connection_call_sync) @@ -745,9 +748,87 @@ public: const Glib::VariantContainerBase& parameters, const Glib::ustring& bus_name = Glib::ustring(), int timeout_msec = -1, - CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, + CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, + const Glib::VariantType& reply_type = Glib::VariantType() + ); + +#ifdef G_OS_LINUX + /** Like call() but also takes a GUnixFDList object. + * This method is only available on UNIX. + * + * @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::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. + * @param fd_list A UnixFDList. + * @param bus_name A unique or well-known bus name or <tt>0</tt> if the + * connection is not a message bus connection. + * @param timeout_msec The timeout in milliseconds, -1 to use the default + * timeout or G_MAXINT for no timeout. + * @param flags Flags from the Gio::DBus::CallFlags enumeration. + * @param reply_type The expected type of the reply, or <tt>0</tt>. + * @newin{2,32} + */ + void call( + const Glib::ustring& object_path, + const Glib::ustring& interface_name, + const Glib::ustring& method_name, + const Glib::VariantContainerBase& parameters, + const SlotAsyncReady& slot, + const Glib::RefPtr<Cancellable>& cancellable, + const Glib::RefPtr<UnixFDList>& fd_list, + const Glib::ustring& bus_name = Glib::ustring(), + int timeout_msec = -1, + CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, + const Glib::VariantType& reply_type = Glib::VariantType() + ); + _IGNORE(g_dbus_connection_call_with_uinx_fd_list) + + /// A non-cancellable version of call() (with a UnixFDList). + void call( + const Glib::ustring& object_path, + const Glib::ustring& interface_name, + const Glib::ustring& method_name, + const Glib::VariantContainerBase& parameters, + const SlotAsyncReady& slot, + const Glib::RefPtr<UnixFDList>& fd_list, + const Glib::ustring& bus_name = Glib::ustring(), + int timeout_msec = -1, + CallFlags flags = Gio::DBus::CALL_FLAGS_NONE, const Glib::VariantType& reply_type = Glib::VariantType() ); +#endif // G_OS_LINUX + + ///** Finishes an operation started with call() (with a UnixFDList). + //* @param res A AsyncResult obtained from the SlotAsyncReady passed to + //* call(). + //* @result A Variant tuple with return values. + //* @throw Glib::Error. + //* @newin{2,32} + //*/ + //TODO: _WRAP_METHOD(Glib::VariantContainerBase call_with_unix_fd_finish(const Glib::RefPtr<AsyncResult>& res{.}, Glib::RefPtr<UnixFDList>& out_fd_list{.?}), g_dbus_connection_call_with_unix_fd_list_finish, errthrow) + + /* + _WRAP_METHOD( + Glib::VariantContainerBase call_sync( + const Glib::ustring& object_path{.}, + const Glib::ustring& interface_name{.}, + const Glib::ustring& method_name{.}, + const Glib::VariantContainerBase& parameters{.}, + const Glib::RefPtr<Cancellable>& cancellable{.?}, + const Glib::RefPtr<UnixFDList>& fd_list{.}, + Glib::RefPtr<UnixFDList>& out_fd_list{.}, + const Glib::ustring& bus_name{.} = Glib::ustring(), + int timeout_msec{.} = -1, + CallFlags flags{.} = Gio::DBus::CALL_FLAGS_NONE, + const Glib::VariantType& reply_type{.} = Glib::VariantType() + ), + g_dbus_connection_call_with_unix_fd_list_sync, errthrow + ) + */ /** Emits a signal. * |