From 65e8e25eee8e389374532e483b46e53ad66ee5c8 Mon Sep 17 00:00:00 2001 From: "satorux@chromium.org" Date: Fri, 11 Nov 2011 08:36:22 +0000 Subject: dbus: Add ObjectProxy::EmptyResponseCallback(). This can be used when the caller is not interested in the response from the D-bus method. BUG=none TEST=added a unit test Review URL: http://codereview.chromium.org/8536007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109598 0039d316-1c4b-4281-b951-d872f2087c98 --- dbus/object_proxy.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'dbus/object_proxy.h') diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h index 5fc4197..484f107 100644 --- a/dbus/object_proxy.h +++ b/dbus/object_proxy.h @@ -73,7 +73,9 @@ class ObjectProxy : public base::RefCountedThreadSafe { // |callback| will be called in the origin thread, once the method call // is complete. As it's called in the origin thread, |callback| can // safely reference objects in the origin thread (i.e. UI thread in most - // cases). + // cases). If the caller is not interested in the response from the + // method (i.e. calling a method that does not return a value), + // EmptyResponseCallback() can be passed to the |callback| parameter. // // If the method call is successful, a pointer to Response object will // be passed to the callback. If unsuccessful, NULL will be passed to @@ -106,6 +108,10 @@ class ObjectProxy : public base::RefCountedThreadSafe { // BLOCKING CALL. virtual void Detach(); + // Returns an empty callback that does nothing. Can be used for + // CallMethod(). + static ResponseCallback EmptyResponseCallback(); + protected: // This is protected, so we can define sub classes. virtual ~ObjectProxy(); -- cgit v1.1