/** * @RDE_HEADER@ * SetRtProfileBase * $Id$ * $HeadURL$ * $Author$ * Created by Christian Fröbel, NLE, 2018-12-17 */ #pragma once #include #include #include #include #include #include class QByteArray; namespace AudioVideoManagement { class IAvaComm; namespace AvaCommands { /** * Base class for setRtProfile-related commands. * It implements the handling of the responses sent in return of a setRtProfile command. * * @see SetRtProfile, ChangeRtProfileCircuitName * @author Christian Fröbel */ class SetRtProfileBase : public ICommand { Q_OBJECT public: SetRtProfileBase(IAvaComm *comm); const QVector &invalidNameList() const { return *m_invalidNames; } protected: /** Supposed to be called by the send() method of the derived class. */ void connectToComm(); /** Supposed to be called by the done() method of the derived class. */ void disconnectFromComm(); void sendCommand(const QString &cmd); virtual void done() = 0; bool nullifies(ICommand *other) const override; private slots: void onOk(); private: void onInvalidNameListReceived(QVector &&invalidNames); bool m_ok{false}; boost::optional> m_invalidNames; IAvaComm *m_comm; InvalidNameListCollector m_collector; }; }} // namespace AudioVideoManagement::AvaCommands