Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
/**
* @RDE_HEADER@
* ICommand
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Fröbel, SLSE, 2017-06-29
*/
#pragma once
#include <AudioVideoManagement/avm_export.h>
#include <QObject>
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