| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | class ICommandQueue; |
| 7 | |
| 8 | class IDataSourceHandler |
| 9 | { |
| 10 | public: |
| 11 | /// Save the state of the data source. |
| 12 | virtual void saveState() = 0; |
| 13 | |
| 14 | /// Queue commands to restore the saved data surce state. |
| 15 | virtual void restoreState(ICommandQueue &ctlCmds) = 0; |
| 16 | |
| 17 | /// Queue commands to reset the data source. |
| 18 | virtual void reset(ICommandQueue &ctlCmds) = 0; |
| 19 | |
| 20 | /// Queue commands to sync the handler state with the data source. |
| 21 | virtual void sync(ICommandQueue &ctlCmds) = 0; |
| 22 | |
| 23 | virtual ~IDataSourceHandler() = default; |
| 24 | }; |