diff options
author | gspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 04:07:05 +0000 |
---|---|---|
committer | gspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 04:07:05 +0000 |
commit | 3c34dd58e21ea33424c635afaf22c82476f56afb (patch) | |
tree | ef57c251ae5f3cef33365659a6e9aa1535fc5a32 /chromeos/dbus/shill_service_client.h | |
parent | 2bab166de6e6cdcbd9168a138a5dca1f266d14c3 (diff) | |
download | chromium_src-3c34dd58e21ea33424c635afaf22c82476f56afb.zip chromium_src-3c34dd58e21ea33424c635afaf22c82476f56afb.tar.gz chromium_src-3c34dd58e21ea33424c635afaf22c82476f56afb.tar.bz2 |
This converts the Shill clients to use an observer pattern
for property change notifications because in a future CL the
javascript private API will need to listen directly to shill
notifications as well, and the previous implementation was limited to
a single handler.
BUG=chromium:147620,chromium:146616
TEST=Ran unit tests, ran on device.
Review URL: https://chromiumcodereview.appspot.com/10965045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/shill_service_client.h')
-rw-r--r-- | chromeos/dbus/shill_service_client.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chromeos/dbus/shill_service_client.h b/chromeos/dbus/shill_service_client.h index 11ae609..7f0cf1c 100644 --- a/chromeos/dbus/shill_service_client.h +++ b/chromeos/dbus/shill_service_client.h @@ -46,14 +46,15 @@ class CHROMEOS_EXPORT ShillServiceClient { static ShillServiceClient* Create(DBusClientImplementationType type, dbus::Bus* bus); - // Sets PropertyChanged signal handler. - virtual void SetPropertyChangedHandler( + // Adds a property changed |observer| to the service at |service_path|. + virtual void AddPropertyChangedObserver( const dbus::ObjectPath& service_path, - const PropertyChangedHandler& handler) = 0; + ShillPropertyChangedObserver* observer) = 0; - // Resets PropertyChanged signal handler. - virtual void ResetPropertyChangedHandler( - const dbus::ObjectPath& service_path) = 0; + // Removes a property changed |observer| to the service at |service_path|. + virtual void RemovePropertyChangedObserver( + const dbus::ObjectPath& service_path, + ShillPropertyChangedObserver* observer) = 0; // Calls GetProperties method. // |callback| is called after the method call succeeds. |