moonlight-qt/app/cli/commandlineparser.h
Janne Hakonen 0ab07303c9 Add quit cli command and app quit option after stream session. Fixes #92 (#138)
* Add quit cli command and app quit option after stream session. Fixes #92

* Code review fixes.
2018-12-05 18:45:28 -08:00

56 lines
1.2 KiB
C++

#pragma once
#include "settings/streamingpreferences.h"
#include <QMap>
#include <QString>
class GlobalCommandLineParser
{
public:
enum ParseResult {
NormalStartRequested,
StreamRequested,
QuitRequested,
};
GlobalCommandLineParser();
virtual ~GlobalCommandLineParser();
ParseResult parse(const QStringList &args);
};
class QuitCommandLineParser
{
public:
QuitCommandLineParser();
virtual ~QuitCommandLineParser();
void parse(const QStringList &args);
QString getHost() const;
private:
QString m_Host;
};
class StreamCommandLineParser
{
public:
StreamCommandLineParser();
virtual ~StreamCommandLineParser();
void parse(const QStringList &args, StreamingPreferences *preferences);
QString getHost() const;
QString getAppName() const;
private:
QString m_Host;
QString m_AppName;
QMap<QString, StreamingPreferences::WindowMode> m_WindowModeMap;
QMap<QString, StreamingPreferences::AudioConfig> m_AudioConfigMap;
QMap<QString, StreamingPreferences::VideoCodecConfig> m_VideoCodecMap;
QMap<QString, StreamingPreferences::VideoDecoderSelection> m_VideoDecoderMap;
};