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

Unified Diff: chromeos/dbus/shill_service_client.h

Issue 10949030: This converts the Shill clients to allow propagation of shill errors (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
Index: chromeos/dbus/shill_service_client.h
diff --git a/chromeos/dbus/shill_service_client.h b/chromeos/dbus/shill_service_client.h
index 11ae6093e9a229065cbca36b2d0a3ed4db1f768b..1db512db98448c4ff581f3359f106d2f5498b9c1 100644
--- a/chromeos/dbus/shill_service_client.h
+++ b/chromeos/dbus/shill_service_client.h
@@ -38,6 +38,7 @@ class CHROMEOS_EXPORT ShillServiceClient {
typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler;
typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback;
typedef ShillClientHelper::ErrorCallback ErrorCallback;
+ typedef ShillClientHelper::PropertyChangedObserver PropertyChangedObserver;
virtual ~ShillServiceClient();
@@ -46,14 +47,13 @@ class CHROMEOS_EXPORT ShillServiceClient {
static ShillServiceClient* Create(DBusClientImplementationType type,
dbus::Bus* bus);
- // Sets PropertyChanged signal handler.
- virtual void SetPropertyChangedHandler(
+ virtual void AddPropertyChangedObserver(
hashimoto 2012/09/21 11:52:01 Please add method comments.
Greg Spencer (Chromium) 2012/09/21 22:03:47 Done.
const dbus::ObjectPath& service_path,
- const PropertyChangedHandler& handler) = 0;
+ PropertyChangedObserver* observer) = 0;
- // Resets PropertyChanged signal handler.
- virtual void ResetPropertyChangedHandler(
- const dbus::ObjectPath& service_path) = 0;
+ virtual void RemovePropertyChangedObserver(
+ const dbus::ObjectPath& service_path,
+ PropertyChangedObserver* observer) = 0;
// Calls GetProperties method.
// |callback| is called after the method call succeeds.
@@ -65,13 +65,15 @@ class CHROMEOS_EXPORT ShillServiceClient {
virtual void SetProperty(const dbus::ObjectPath& service_path,
const std::string& name,
const base::Value& value,
- const VoidDBusMethodCallback& callback) = 0;
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
// Calls ClearProperty method.
// |callback| is called after the method call succeeds.
virtual void ClearProperty(const dbus::ObjectPath& service_path,
const std::string& name,
- const VoidDBusMethodCallback& callback) = 0;
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
// Calls Connect method.
// |callback| is called after the method call succeeds.
@@ -82,19 +84,22 @@ class CHROMEOS_EXPORT ShillServiceClient {
// Calls Disconnect method.
// |callback| is called after the method call succeeds.
virtual void Disconnect(const dbus::ObjectPath& service_path,
- const VoidDBusMethodCallback& callback) = 0;
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
// Calls Remove method.
// |callback| is called after the method call succeeds.
virtual void Remove(const dbus::ObjectPath& service_path,
- const VoidDBusMethodCallback& callback) = 0;
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
// Calls ActivateCellularModem method.
// |callback| is called after the method call succeeds.
virtual void ActivateCellularModem(
const dbus::ObjectPath& service_path,
const std::string& carrier,
- const VoidDBusMethodCallback& callback) = 0;
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
// DEPRECATED DO NOT USE: Calls ActivateCellularModem method and blocks until
// the method call finishes.

Powered by Google App Engine
This is Rietveld 408576698