Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: dbus/object_proxy.h

Issue 14568005: Add a method to check if a D-Bus service has an owner. Use it for mtpd. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dbus/object_proxy.cc » ('j') | dbus/object_proxy.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/object_proxy.h
===================================================================
--- dbus/object_proxy.h (revision 197157)
+++ dbus/object_proxy.h (working copy)
@@ -64,13 +64,13 @@
// Called when an error response is returned or no response is returned.
// Used for CallMethodWithErrorCallback().
- typedef base::Callback<void(ErrorResponse*)> ErrorCallback;
+ typedef base::Callback<void(ErrorResponse* error_response)> ErrorCallback;
// Called when the response is returned. Used for CallMethod().
- typedef base::Callback<void(Response*)> ResponseCallback;
+ typedef base::Callback<void(Response* response)> ResponseCallback;
// Called when a signal is received. Signal* is the incoming signal.
- typedef base::Callback<void (Signal*)> SignalCallback;
+ typedef base::Callback<void (Signal* signal)> SignalCallback;
// Called when the object proxy is connected to the signal.
// Parameters:
@@ -153,6 +153,13 @@
// BLOCKING CALL.
virtual void Detach();
+ // Convenient form of CallMethodAndBlock() to call
+ // org.freedesktop.DBus.GetNameOwner for the given |service_name|.
+ // Returns true if |service_name| has an owner.
+ //
+ // BLOCKING CALL.
+ static bool ServiceHasOwner(dbus::Bus* bus, const std::string& service_name);
satorux1 2013/04/30 01:53:10 Looks rather awkward to have this in ObjectProxy a
+
// Returns an empty callback that does nothing. Can be used for
// CallMethod().
static ResponseCallback EmptyResponseCallback();
« no previous file with comments | « no previous file | dbus/object_proxy.cc » ('j') | dbus/object_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698