/** * @RDE_HEADER@ * ICommand * $Id$ * $HeadURL$ * $Author$ * Created by Christian Fröbel, SLSE, 2017-06-29 */ #pragma once #include #include namespace AudioVideoManagement { /** * Internal helper class for AvaControl in order to send a command to the * AVS system and synchronize with the reponse. * This way AvaControl ensures that a new command is only sent when the * response of the previous command has been received. * * The idea is that upon send() the command connects to the signals of interest * of AvaComm. When the command is done it calls AvaControl::done(this). * * @author Christian Fröbel */ class AVM_COMMON_EXPORT ICommand : public QObject { Q_OBJECT public: virtual ~ICommand() = default; virtual void send() = 0; virtual QString debug() const = 0; virtual bool canTimeout() const { return false; } /** * Check whether this command nullifies other. * Nullifying means that when this command is sent after other, * it would nullify the effect of other. * If so, other can be dropped. */ virtual bool nullifies(ICommand *other) const { Q_UNUSED(other); return false; } }; } // namespace AudioVideoManagement