Commit 8818e129 authored by Arnaud Mandy's avatar Arnaud Mandy Committed by Commit Bot

udev_watcher: improving Observer class definition

OnDeviceAdded() and OnDeviceRemoved() abstract.
destructor being protected.

Change-Id: Ibc348d6565b6d2627ae53a34f05a63c08f68a8e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546308Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#646458}
parent 297646a2
...@@ -22,9 +22,11 @@ class UdevWatcher { ...@@ -22,9 +22,11 @@ class UdevWatcher {
public: public:
class Observer { class Observer {
public: public:
virtual void OnDeviceAdded(ScopedUdevDevicePtr device) = 0;
virtual void OnDeviceRemoved(ScopedUdevDevicePtr device) = 0;
protected:
virtual ~Observer(); virtual ~Observer();
virtual void OnDeviceAdded(ScopedUdevDevicePtr device);
virtual void OnDeviceRemoved(ScopedUdevDevicePtr device);
}; };
// subsystem and devtype parameter for // subsystem and devtype parameter for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment