Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* SetScript
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Astrid Müller, SGAS, 2018-02-14
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "icommand.h"
|
||||
#include <AudioVideoManagement/ava_types.h>
|
||||
#include <QString>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
class IAvaComm;
|
||||
class IAvaCommandDoneObserver;
|
||||
|
||||
namespace AvaCommands
|
||||
{
|
||||
|
||||
/**
|
||||
* The response to setScript depends on whether a script is currently
|
||||
* set or not.
|
||||
* The response to the actual setScript contains -- among other things --
|
||||
* a ScriptInfo and a ScriptState.
|
||||
* @author Astrid Müller
|
||||
*/
|
||||
class SetScript final : public ICommand
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SetScript(IAvaComm *comm, IAvaCommandDoneObserver *doneObserver, const QString &dialogId,
|
||||
const QString &scriptName, AvaScriptSource source,
|
||||
const QVector<AvaScriptEntry> &streams);
|
||||
|
||||
void send() override;
|
||||
QString debug() const override { return QLatin1String("SetScript"); }
|
||||
|
||||
/**
|
||||
* May only be called after the command has successfully completed.
|
||||
*/
|
||||
///{@
|
||||
AvaStreamInfo scriptInfo() const { return *m_scriptInfo; }
|
||||
AvaStreamState scriptState() const { return *m_scriptState; }
|
||||
///@}
|
||||
|
||||
private slots:
|
||||
void onScriptInfoReceived(const QString &dialogId, const QString &scriptName, const AvaStreamInfo &scriptInfo);
|
||||
void onScriptStateReceived(const QString &dialogId, const QString &scriptName, AvaStreamState scriptState);
|
||||
|
||||
private:
|
||||
void done();
|
||||
|
||||
const QString m_dialogId;
|
||||
const QString m_scriptName;
|
||||
AvaScriptSource m_scriptSource;
|
||||
const QVector<AvaScriptEntry> m_streams;
|
||||
boost::optional<AvaStreamInfo> m_scriptInfo;
|
||||
boost::optional<AvaStreamState> m_scriptState;
|
||||
IAvaComm *m_comm;
|
||||
IAvaCommandDoneObserver *m_observer;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace AudioVideoManagement::AvaCommands
|
||||
|
||||
Reference in new issue
Block a user