Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* SetRtProfileBase
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Fröbel, NLE, 2018-12-17
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AudioVideoManagement/icommand.h>
|
||||
#include <AudioVideoManagement/list_response_collector.h>
|
||||
#include <QVector>
|
||||
#include <QString>
|
||||
#include <boost/optional.hpp>
|
||||
#include <functional>
|
||||
|
||||
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<QString> &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<QString> &&invalidNames);
|
||||
|
||||
bool m_ok{false};
|
||||
boost::optional<QVector<QString>> m_invalidNames;
|
||||
IAvaComm *m_comm;
|
||||
InvalidNameListCollector m_collector;
|
||||
};
|
||||
|
||||
}} // namespace AudioVideoManagement::AvaCommands
|
||||
Reference in new issue
Block a user