mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-14 23:47:09 +00:00
93 lines
1.9 KiB
C++
93 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "settings/streamingpreferences.h"
|
|
|
|
#include <QMap>
|
|
#include <QString>
|
|
|
|
class GlobalCommandLineParser
|
|
{
|
|
public:
|
|
enum ParseResult {
|
|
NormalStartRequested,
|
|
StreamRequested,
|
|
QuitRequested,
|
|
PairRequested,
|
|
ListRequested,
|
|
};
|
|
|
|
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 PairCommandLineParser
|
|
{
|
|
public:
|
|
PairCommandLineParser();
|
|
virtual ~PairCommandLineParser();
|
|
|
|
void parse(const QStringList &args);
|
|
|
|
QString getHost() const;
|
|
QString getPredefinedPin() const;
|
|
|
|
private:
|
|
QString m_Host;
|
|
QString m_PredefinedPin;
|
|
};
|
|
|
|
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;
|
|
QMap<QString, StreamingPreferences::CaptureSysKeysMode> m_CaptureSysKeysModeMap;
|
|
};
|
|
|
|
class ListCommandLineParser
|
|
{
|
|
public:
|
|
ListCommandLineParser();
|
|
virtual ~ListCommandLineParser();
|
|
|
|
void parse(const QStringList &args);
|
|
|
|
QString getHost() const;
|
|
bool isPrintCSV() const;
|
|
bool isVerbose() const;
|
|
|
|
private:
|
|
QString m_Host;
|
|
bool m_PrintCSV;
|
|
bool m_Verbose;
|
|
};
|