68 lines
1.6 KiB
C++
Executable File
68 lines
1.6 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* StartScript
|
|
* $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 StartScript depends on whether a script is started
|
|
* or not.
|
|
* The response to the actual StartScript contains
|
|
* a ScriptState.
|
|
* @author Hanna E. Rathje
|
|
*/
|
|
class StartScript final : public ICommand
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
StartScript(IAvaComm *comm, IAvaCommandDoneObserver *doneObserver, const QString &dialogId, const QString &scriptName, bool bBlocking);
|
|
|
|
void send() override;
|
|
QString debug() const override { return QLatin1String("StartScript"); }
|
|
|
|
/**
|
|
* May only be called after the command has successfully completed.
|
|
*/
|
|
///{@
|
|
AvaStreamState scriptState() const { return *m_scriptState; }
|
|
///@}
|
|
|
|
private slots:
|
|
void onScriptStateReceived(const QString &dialogId, const QString &scriptName, AvaStreamState scriptState);
|
|
void onScriptPositionReceived(const QString &dialogId, const QString &scriptName, const QString &streamName, AvaTimePoint pos, AvaTimePoint relPos);
|
|
|
|
private:
|
|
void done();
|
|
|
|
const QString m_dialogId;
|
|
const QString m_scriptName;
|
|
boost::optional<AvaStreamState> m_scriptState;
|
|
IAvaComm *m_comm;
|
|
IAvaCommandDoneObserver *m_observer;
|
|
bool m_bBlocking;
|
|
};
|
|
|
|
}
|
|
} // namespace AudioVideoManagement::AvaCommands
|
|
|