Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CROS_DISKS_DEVICE_EVENT_SOURCE_INTERFACE_H_ |
| 6 | #define CROS_DISKS_DEVICE_EVENT_SOURCE_INTERFACE_H_ |
| 7 | |
Ben Chan | 5ccd9fe | 2013-11-13 18:28:27 -0800 | [diff] [blame] | 8 | #include "cros-disks/device_event.h" |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 9 | |
Ben Chan | 7599f99 | 2011-12-13 16:04:34 -0800 | [diff] [blame] | 10 | namespace cros_disks { |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 11 | |
| 12 | // An interface class for producing device events. |
| 13 | class DeviceEventSourceInterface { |
| 14 | public: |
Ben Chan | 40ecb9b | 2017-03-08 11:26:07 -0800 | [diff] [blame] | 15 | virtual ~DeviceEventSourceInterface() = default; |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 16 | |
Ben Chan | 7599f99 | 2011-12-13 16:04:34 -0800 | [diff] [blame] | 17 | // Implemented by a derived class to return the available device events |
| 18 | // in |events|. Returns false on error. |
| 19 | virtual bool GetDeviceEvents(DeviceEventList* events) = 0; |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame] | 20 | }; |
| 21 | |
| 22 | } // namespace cros_disks |
| 23 | |
| 24 | #endif // CROS_DISKS_DEVICE_EVENT_SOURCE_INTERFACE_H_ |