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 | |
| 8 | namespace cros_disks { |
| 9 | |
| 10 | class DeviceEvent; |
| 11 | |
| 12 | // An interface class for producing device events. |
| 13 | class DeviceEventSourceInterface { |
| 14 | public: |
| 15 | virtual ~DeviceEventSourceInterface() {} |
| 16 | |
| 17 | // Implemented by a derived class to return the next available device event |
| 18 | // in |event|. Returns false on error or if not device event is available. |
| 19 | virtual bool GetDeviceEvent(DeviceEvent* event) = 0; |
| 20 | }; |
| 21 | |
| 22 | } // namespace cros_disks |
| 23 | |
| 24 | #endif // CROS_DISKS_DEVICE_EVENT_SOURCE_INTERFACE_H_ |