2018-09-29 21:06:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
2018-12-06 02:45:28 +00:00
|
|
|
#include <QVariant>
|
2018-09-29 21:06:55 +00:00
|
|
|
|
|
|
|
class ComputerManager;
|
|
|
|
class NvComputer;
|
|
|
|
class Session;
|
|
|
|
class StreamingPreferences;
|
|
|
|
|
|
|
|
namespace CliStartStream
|
|
|
|
{
|
|
|
|
|
|
|
|
class Event;
|
|
|
|
class LauncherPrivate;
|
|
|
|
|
|
|
|
class Launcher : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_DECLARE_PRIVATE_D(m_DPtr, Launcher)
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit Launcher(QString computer, QString app,
|
|
|
|
StreamingPreferences* preferences,
|
|
|
|
QObject *parent = nullptr);
|
|
|
|
~Launcher();
|
|
|
|
Q_INVOKABLE void execute(ComputerManager *manager);
|
2018-12-06 02:45:28 +00:00
|
|
|
Q_INVOKABLE void quitRunningApp();
|
|
|
|
Q_INVOKABLE bool isExecuted() const;
|
2018-09-29 21:06:55 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void searchingComputer();
|
|
|
|
void searchingApp();
|
|
|
|
void sessionCreated(QString appName, Session *session);
|
|
|
|
void failed(QString text);
|
2018-12-06 02:45:28 +00:00
|
|
|
void appQuitRequired(QString appName);
|
2018-09-29 21:06:55 +00:00
|
|
|
|
|
|
|
private slots:
|
2018-12-06 02:45:28 +00:00
|
|
|
void onComputerFound(NvComputer *computer);
|
2018-09-29 21:06:55 +00:00
|
|
|
void onComputerUpdated(NvComputer *computer);
|
|
|
|
void onTimeout();
|
2018-12-06 02:45:28 +00:00
|
|
|
void onQuitAppCompleted(QVariant error);
|
2018-09-29 21:06:55 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QScopedPointer<LauncherPrivate> m_DPtr;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|